Adjustments for Vulkan 1.0.64 (#140)

This commit is contained in:
Andreas Süßenbach 2017-10-24 16:15:43 +02:00 committed by Markus Tavenrath
parent d62cb5d199
commit cb55e77f53
4 changed files with 729 additions and 267 deletions

@ -1 +1 @@
Subproject commit d2d907e4f3730bc4290b518faf0604492b302693 Subproject commit 5436521608c40f324b397693f5bb758d666e3f55

View File

@ -790,10 +790,11 @@ struct DependencyData
std::set<std::string> forwardDependencies; std::set<std::string> forwardDependencies;
}; };
struct NameValue struct EnumValueData
{ {
std::string name; std::string name;
std::string value; std::string value;
std::string alias;
}; };
struct EnumData struct EnumData
@ -803,25 +804,28 @@ struct EnumData
, bitmask(b) , bitmask(b)
{} {}
void addEnumMember(std::string const& name, std::string const& tag); void addEnumValue(std::string const& name, std::string const& tag);
std::string name; std::string name;
std::string prefix; std::string prefix;
std::string postfix; std::string postfix;
std::vector<NameValue> members; std::vector<EnumValueData> values;
std::string protect; std::string protect;
bool bitmask; bool bitmask;
std::string alias;
}; };
struct FlagData struct FlagData
{ {
std::string protect; std::string protect;
std::string alias;
}; };
struct HandleData struct HandleData
{ {
std::vector<std::string> commands; std::vector<std::string> commands;
std::string protect; std::string protect;
std::string alias;
}; };
struct ScalarData struct ScalarData
@ -848,6 +852,7 @@ struct StructData
std::vector<MemberData> members; std::vector<MemberData> members;
std::string protect; std::string protect;
std::vector<std::string> structExtends; std::vector<std::string> structExtends;
std::string alias;
}; };
struct DeleterData struct DeleterData
@ -867,9 +872,11 @@ struct ExtensionData
struct VkData struct VkData
{ {
std::map<std::string, CommandData> commands; std::map<std::string, CommandData> commands;
std::map<std::string, std::string> constants;
std::set<std::string> defines;
std::list<DependencyData> dependencies; std::list<DependencyData> dependencies;
std::map<std::string, DeleterData> deleters; // map from child types to corresponding deleter data
std::map<std::string, std::set<std::string>> deleterTypes; // map from parent type to set of child types std::map<std::string, std::set<std::string>> deleterTypes; // map from parent type to set of child types
std::map<std::string, DeleterData> deleterData; // map from child types to corresponding deleter data
std::map<std::string, EnumData> enums; std::map<std::string, EnumData> enums;
std::map<std::string, FlagData> flags; std::map<std::string, FlagData> flags;
std::map<std::string, HandleData> handles; std::map<std::string, HandleData> handles;
@ -886,6 +893,7 @@ struct VkData
#endif #endif
}; };
void aliasEnum(VkData & vkData, std::map<std::string, EnumData>::iterator enumsIt, std::string const& newName, std::string const& protect);
void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues ); void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues );
void determineEnhancedReturnType(CommandData & commandData); void determineEnhancedReturnType(CommandData & commandData);
void determineReducedName(CommandData & commandData); void determineReducedName(CommandData & commandData);
@ -910,14 +918,19 @@ void readCommandsCommand(tinyxml2::XMLElement * element, VkData & vkData);
std::vector<std::string> readCommandSuccessCodes(tinyxml2::XMLElement* element, std::set<std::string> const& tags); std::vector<std::string> readCommandSuccessCodes(tinyxml2::XMLElement* element, std::set<std::string> const& tags);
void readComment(tinyxml2::XMLElement * element, std::string & header); void readComment(tinyxml2::XMLElement * element, std::string & header);
void readEnums( tinyxml2::XMLElement * element, VkData & vkData ); void readEnums( tinyxml2::XMLElement * element, VkData & vkData );
void readEnumsConstant(tinyxml2::XMLElement * element, std::map<std::string, std::string> & constants);
void readEnumsEnum( tinyxml2::XMLElement * element, EnumData & enumData ); void readEnumsEnum( tinyxml2::XMLElement * element, EnumData & enumData );
void readDisabledExtensionRequire(tinyxml2::XMLElement * element, VkData & vkData); void readDisabledExtensionRequire(tinyxml2::XMLElement * element, VkData & vkData);
void readExtensionAlias(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect, std::string const& tag);
void readExtensionCommand(tinyxml2::XMLElement * element, std::map<std::string, CommandData> & commands, std::string const& protect); void readExtensionCommand(tinyxml2::XMLElement * element, std::map<std::string, CommandData> & commands, std::string const& protect);
void readExtensionEnum(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums, std::string const& tag); void readExtensionEnum(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums, std::string const& tag);
void readExtensionRequire(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect, std::string const& tag); void readExtensionRequire(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect, std::string const& tag);
void readExtensions( tinyxml2::XMLElement * element, VkData & vkData ); void readExtensions( tinyxml2::XMLElement * element, VkData & vkData );
void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData); void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData);
void readExtensionType(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect); void readExtensionType(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect);
void readFeature(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums);
void readFeatureRequire(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums);
void readFeatureRequireEnum(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums);
tinyxml2::XMLNode* readType(tinyxml2::XMLNode* element, std::string & type, std::string & pureType); tinyxml2::XMLNode* readType(tinyxml2::XMLNode* element, std::string & type, std::string & pureType);
void readTypeBasetype( tinyxml2::XMLElement * element, std::list<DependencyData> & dependencies ); void readTypeBasetype( tinyxml2::XMLElement * element, std::list<DependencyData> & dependencies );
void readTypeBitmask( tinyxml2::XMLElement * element, VkData & vkData); void readTypeBitmask( tinyxml2::XMLElement * element, VkData & vkData);
@ -928,6 +941,7 @@ void readTypeStruct( tinyxml2::XMLElement * element, VkData & vkData, bool isUni
void readTypeStructMember( tinyxml2::XMLElement * element, VkData & vkData, StructData & structData ); void readTypeStructMember( tinyxml2::XMLElement * element, VkData & vkData, StructData & structData );
void readTags(tinyxml2::XMLElement * element, std::set<std::string> & tags); void readTags(tinyxml2::XMLElement * element, std::set<std::string> & tags);
void readTypes(tinyxml2::XMLElement * element, VkData & vkData); void readTypes(tinyxml2::XMLElement * element, VkData & vkData);
void readTypesType(tinyxml2::XMLElement * element, VkData & vkData);
std::string reduceName(std::string const& name, bool singular = false); std::string reduceName(std::string const& name, bool singular = false);
void registerDeleter(VkData & vkData, CommandData const& commandData); void registerDeleter(VkData & vkData, CommandData const& commandData);
std::string startLowerCase(std::string const& input); std::string startLowerCase(std::string const& input);
@ -938,6 +952,7 @@ std::string stripPluralS(std::string const& name);
std::string toCamelCase(std::string const& value); std::string toCamelCase(std::string const& value);
std::vector<std::string> tokenize(std::string tokenString, char separator); std::vector<std::string> tokenize(std::string tokenString, char separator);
std::string toUpperCase(std::string const& name); std::string toUpperCase(std::string const& name);
std::string trim(std::string const& input);
std::string trimEnd(std::string const& input); std::string trimEnd(std::string const& input);
void writeCall(std::ostream & os, CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular); void writeCall(std::ostream & os, CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular);
std::string generateCall(CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular); std::string generateCall(CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular);
@ -946,8 +961,8 @@ void writeCallParameter(std::ostream & os, ParamData const& paramData, std::set<
void writeCallPlainTypeParameter(std::ostream & os, ParamData const& paramData); void writeCallPlainTypeParameter(std::ostream & os, ParamData const& paramData);
void writeCallVectorParameter(std::ostream & os, CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular, std::map<size_t, size_t>::const_iterator it); void writeCallVectorParameter(std::ostream & os, CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular, std::map<size_t, size_t>::const_iterator it);
void writeCallVulkanTypeParameter(std::ostream & os, ParamData const& paramData); void writeCallVulkanTypeParameter(std::ostream & os, ParamData const& paramData);
void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleterData); void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleters);
void writeDeleterForwardDeclarations(std::ostream &os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleterData); void writeDeleterForwardDeclarations(std::ostream &os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleters);
void writeEnumsToString(std::ostream & os, EnumData const& enumData); void writeEnumsToString(std::ostream & os, EnumData const& enumData);
void writeFlagsToString(std::ostream & os, std::string const& flagsName, EnumData const &enumData); void writeFlagsToString(std::ostream & os, std::string const& flagsName, EnumData const &enumData);
void writeFunction(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, bool definition, bool enhanced, bool singular, bool unique, bool isStructureChain); void writeFunction(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, bool definition, bool enhanced, bool singular, bool unique, bool isStructureChain);
@ -989,24 +1004,47 @@ void writeTypes(std::ostream & os, VkData const& vkData, std::map<std::string, s
void writeVersionCheck(std::ostream & os, std::string const& version); void writeVersionCheck(std::ostream & os, std::string const& version);
void writeTypesafeCheck(std::ostream & os, std::string const& typesafeCheck); void writeTypesafeCheck(std::ostream & os, std::string const& typesafeCheck);
void EnumData::addEnumMember(std::string const &name, std::string const& tag) std::string createEnumValueName(std::string const& name, std::string const& prefix, std::string const& postfix, bool bitmask, std::string const& tag)
{ {
NameValue nv; std::string result = "e" + toCamelCase(strip(name, prefix, postfix));
nv.name = "e" + toCamelCase(strip(name, prefix, postfix));
nv.value = name;
if (bitmask) if (bitmask)
{ {
size_t pos = nv.name.find("Bit"); size_t pos = result.find("Bit");
if (pos != std::string::npos) if (pos != std::string::npos)
{ {
nv.name.erase(pos, 3); result.erase(pos, 3);
} }
} }
if (!tag.empty() && (nv.name.substr(nv.name.length() - tag.length()) == toCamelCase(tag))) if (!tag.empty() && (result.substr(result.length() - tag.length()) == toCamelCase(tag)))
{ {
nv.name = nv.name.substr(0, nv.name.length() - tag.length()) + tag; result = result.substr(0, result.length() - tag.length()) + tag;
} }
members.push_back(nv); return result;
}
void EnumData::addEnumValue(std::string const &name, std::string const& tag)
{
EnumValueData evd;
evd.name = createEnumValueName(name, prefix, postfix, bitmask, tag);
evd.value = name;
auto it = std::find_if(values.begin(), values.end(), [&evd](EnumValueData const& _evd) { return _evd.name == evd.name; });
if (it == values.end())
{
values.push_back(evd);
}
else
{
assert(it->value == evd.value);
}
}
void aliasEnum(VkData & vkData, std::map<std::string, EnumData>::iterator enumsIt, std::string const& newName, std::string const& protect)
{
assert(vkData.enums.find(newName) == vkData.enums.end());
assert(enumsIt->second.protect == protect);
assert(enumsIt->second.alias.empty());
enumsIt->second.alias = newName;
} }
void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues ) void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues )
@ -1022,9 +1060,9 @@ void createDefaults( VkData const& vkData, std::map<std::string,std::string> & d
{ {
assert(vkData.enums.find(dependency.name) != vkData.enums.end()); assert(vkData.enums.find(dependency.name) != vkData.enums.end());
EnumData const & enumData = vkData.enums.find(dependency.name)->second; EnumData const & enumData = vkData.enums.find(dependency.name)->second;
if (!enumData.members.empty()) if (!enumData.values.empty())
{ {
defaultValues[dependency.name] = dependency.name + "::" + vkData.enums.find(dependency.name)->second.members.front().name; defaultValues[dependency.name] = dependency.name + "::" + vkData.enums.find(dependency.name)->second.values.front().name;
} }
else else
{ {
@ -1304,7 +1342,7 @@ std::string readArraySize(tinyxml2::XMLNode * node, std::string& name)
node = node->NextSibling(); node = node->NextSibling();
if (node && node->ToText()) if (node && node->ToText())
{ {
std::string value = node->Value(); std::string value = trimEnd(node->Value());
if (value == "[") if (value == "[")
{ {
// if this node has '[' as its value, the next node holds the array size, and the node after that needs to hold ']', and there should be no more siblings // if this node has '[' as its value, the next node holds the array size, and the node after that needs to hold ']', and there should be no more siblings
@ -1312,7 +1350,7 @@ std::string readArraySize(tinyxml2::XMLNode * node, std::string& name)
assert(node && node->ToElement() && (strcmp(node->Value(), "enum") == 0)); assert(node && node->ToElement() && (strcmp(node->Value(), "enum") == 0));
arraySize = node->ToElement()->GetText(); arraySize = node->ToElement()->GetText();
node = node->NextSibling(); node = node->NextSibling();
assert(node && node->ToText() && (strcmp(node->Value(), "]") == 0)); assert(node && node->ToText() && (trimEnd(node->Value()) == "]"));
} }
else else
{ {
@ -1330,9 +1368,15 @@ bool readCommandParam( tinyxml2::XMLElement * element, std::set<std::string> & d
{ {
ParamData param; ParamData param;
bool isTwoStep = false;
if (element->Attribute("len")) if (element->Attribute("len"))
{ {
param.len = element->Attribute("len"); param.len = element->Attribute("len");
auto pit = std::find_if(params.begin(), params.end(), [&param](ParamData const& pd) { return param.len == pd.name; });
if (pit != params.end())
{
isTwoStep = (pit->type.find('*') != std::string::npos);
}
} }
// get the type of the parameter, and put it into the list of dependencies // get the type of the parameter, and put it into the list of dependencies
@ -1348,8 +1392,8 @@ bool readCommandParam( tinyxml2::XMLElement * element, std::set<std::string> & d
params.push_back(param); params.push_back(param);
// an optional parameter with "false,true" value is supposed to be part of a two-step algorithm: first get the size, than use it assert(!isTwoStep || (param.type.substr(0, 6) != "const "));
return element->Attribute("optional") && (strcmp(element->Attribute("optional"), "false,true") == 0); return isTwoStep;
} }
void readCommandParams(tinyxml2::XMLElement* element, std::set<std::string> & dependencies, CommandData & commandData) void readCommandParams(tinyxml2::XMLElement* element, std::set<std::string> & dependencies, CommandData & commandData)
@ -1377,7 +1421,7 @@ tinyxml2::XMLNode* readCommandParamType(tinyxml2::XMLNode* node, ParamData& para
if (node->ToText()) if (node->ToText())
{ {
// start type with "const" or "struct", if needed // start type with "const" or "struct", if needed
std::string value = trimEnd(node->Value()); std::string value = trim(node->Value());
assert((value == "const") || (value == "struct")); assert((value == "const") || (value == "struct"));
param.type = value + " "; param.type = value + " ";
node = node->NextSibling(); node = node->NextSibling();
@ -1502,7 +1546,14 @@ void readEnums( tinyxml2::XMLElement * element, VkData & vkData )
} }
std::string name = strip(element->Attribute("name"), "Vk"); std::string name = strip(element->Attribute("name"), "Vk");
if ( name != "API Constants" ) // skip the "API Constants" if (name == "API Constants")
{
for (tinyxml2::XMLElement * child = element->FirstChildElement(); child; child = child->NextSiblingElement())
{
readEnumsConstant(child, vkData.constants);
}
}
else
{ {
// add an empty DependencyData on this name into the dependencies list // add an empty DependencyData on this name into the dependencies list
vkData.dependencies.push_back( DependencyData( DependencyData::Category::ENUM, name ) ); vkData.dependencies.push_back( DependencyData( DependencyData::Category::ENUM, name ) );
@ -1568,6 +1619,14 @@ void readEnums( tinyxml2::XMLElement * element, VkData & vkData )
} }
} }
void readEnumsConstant(tinyxml2::XMLElement * element, std::map<std::string, std::string> & constants)
{
assert((strcmp(element->Value(), "enum") == 0) && element->Attribute("value") && element->Attribute("name"));
std::string name = element->Attribute("name");
assert(constants.find(name) == constants.end());
constants[name] = element->Attribute("value");
}
void readEnumsEnum( tinyxml2::XMLElement * element, EnumData & enumData ) void readEnumsEnum( tinyxml2::XMLElement * element, EnumData & enumData )
{ {
// read the names of the enum values // read the names of the enum values
@ -1576,7 +1635,7 @@ void readEnumsEnum( tinyxml2::XMLElement * element, EnumData & enumData )
{ {
if ( child->Attribute( "name" ) ) if ( child->Attribute( "name" ) )
{ {
enumData.addEnumMember(child->Attribute("name"), ""); enumData.addEnumValue(child->Attribute("name"), "");
} }
child = child->NextSiblingElement(); child = child->NextSiblingElement();
} }
@ -1636,6 +1695,109 @@ void readDisabledExtensionRequire(tinyxml2::XMLElement * element, VkData & vkDat
} }
} }
void readExtensionAlias(tinyxml2::XMLElement * element, VkData & vkData, std::string const& protect, std::string const& tag)
{
assert(element->Attribute("name") && element->Attribute("value"));
std::string name = element->Attribute("name");
std::string value = element->Attribute("value");
auto commandsIt = vkData.commands.find(startLowerCase(strip(value, "vk")));
if (commandsIt != vkData.commands.end())
{
// the alias is on a command -> add a command with that name
CommandData commandData = commandsIt->second;
commandData.fullName = startLowerCase(strip(name, "vk"));
assert(vkData.commands.find(commandData.fullName) == vkData.commands.end());
determineReducedName(commandData);
vkData.commands.insert(std::make_pair(commandData.fullName, commandData));
}
else
{
auto constantsIt = vkData.constants.find(value);
if (constantsIt != vkData.constants.end())
{
// alias on a constant -> just add it to the set of constants... we're doing nothing with them
auto it = vkData.constants.find(name);
assert((vkData.constants.find(name) == vkData.constants.end()) || (vkData.constants.find(name)->second == constantsIt->second));
vkData.constants[name] = constantsIt->second;
}
else
{
std::string strippedValue = strip(value, "Vk");
std::string strippedName = strip(name, "Vk");
auto enumsIt = vkData.enums.find(strippedValue);
if (enumsIt != vkData.enums.end())
{
// the alias is on an enum -> set the alias, which will map to a using directive
aliasEnum(vkData, enumsIt, strippedName, protect);
}
else
{
auto flagsIt = vkData.flags.find(strippedValue);
if (flagsIt != vkData.flags.end())
{
// the alias is on a flags -> set the alias, which will map to a using directive
assert(vkData.flags.find(strippedName) == vkData.flags.end());
assert(flagsIt->second.alias.empty());
flagsIt->second.alias = strippedName;
// adjust the generated enum name as well, if it's empty (and therefore auto-generated)
std::string enumName = generateEnumNameForFlags(strippedValue);
std::map<std::string, EnumData>::iterator enumsIt = vkData.enums.find(enumName);
assert(enumsIt != vkData.enums.end());
if (enumsIt->second.values.empty())
{
aliasEnum(vkData, enumsIt, generateEnumNameForFlags(flagsIt->second.alias), protect);
}
}
else
{
auto handlesIt = vkData.handles.find(strippedValue);
if (handlesIt != vkData.handles.end())
{
assert(vkData.handles.find(strippedName) == vkData.handles.end());
assert(handlesIt->second.protect == protect);
assert(handlesIt->second.alias.empty());
handlesIt->second.alias = strippedName;
}
else
{
auto structsIt = vkData.structs.find(strippedValue);
if (structsIt != vkData.structs.end())
{
// the alias is on a structure -> set the alias, which will map to a using directive
assert(vkData.structs.find(strippedName) == vkData.structs.end());
assert(structsIt->second.protect == protect);
assert(structsIt->second.alias.empty() || (structsIt->second.alias == strippedName));
structsIt->second.alias = strippedName;
}
else
{
// final catch: it has to be an enum value
bool found = false;
for (auto & e : vkData.enums)
{
auto valueIt = std::find_if(e.second.values.begin(), e.second.values.end(), [&value](EnumValueData const& evd) { return evd.value == value; });
if (valueIt != e.second.values.end())
{
assert(std::find_if(e.second.values.begin(), e.second.values.end(), [&name](EnumValueData const& evd) {return evd.value == name; }) == e.second.values.end());
assert(valueIt->alias.empty());
valueIt->alias = createEnumValueName(name, e.second.prefix, e.second.postfix, e.second.bitmask, tag);
found = true;
break;
}
}
assert(found);
}
}
}
}
}
}
}
void readExtensionCommand(tinyxml2::XMLElement * element, std::map<std::string, CommandData> & commands, std::string const& protect) void readExtensionCommand(tinyxml2::XMLElement * element, std::map<std::string, CommandData> & commands, std::string const& protect)
{ {
// just add the protect string to the CommandData // just add the protect string to the CommandData
@ -1655,11 +1817,12 @@ void readExtensionEnum(tinyxml2::XMLElement * element, std::map<std::string, Enu
if (element->Attribute("extends")) if (element->Attribute("extends"))
{ {
assert(element->Attribute("name")); assert(element->Attribute("name"));
assert(enums.find(strip(element->Attribute("extends"), "Vk")) != enums.end()); std::string extends = strip(element->Attribute("extends"), "Vk");
assert(enums.find(extends) != enums.end());
assert(!!element->Attribute("bitpos") + !!element->Attribute("offset") + !!element->Attribute("value") == 1); assert(!!element->Attribute("bitpos") + !!element->Attribute("offset") + !!element->Attribute("value") == 1);
auto enumIt = enums.find(strip(element->Attribute("extends"), "Vk")); auto enumIt = enums.find(extends);
assert(enumIt != enums.end()); assert(enumIt != enums.end());
enumIt->second.addEnumMember(element->Attribute("name"), tag); enumIt->second.addEnumValue(element->Attribute("name"), tag);
} }
} }
@ -1669,7 +1832,11 @@ void readExtensionRequire(tinyxml2::XMLElement * element, VkData & vkData, std::
{ {
std::string value = child->Value(); std::string value = child->Value();
if ( value == "command" ) if (value == "alias")
{
readExtensionAlias(child, vkData, protect, tag);
}
else if ( value == "command" )
{ {
readExtensionCommand(child, vkData.commands, protect); readExtensionCommand(child, vkData.commands, protect);
} }
@ -1721,6 +1888,11 @@ void readExtensionsExtension(tinyxml2::XMLElement * element, VkData & vkData)
{ {
protect = element->Attribute("protect"); protect = element->Attribute("protect");
} }
else if (element->Attribute("platform"))
{
assert(element->Attribute("author"));
protect = "VK_USE_PLATFORM_" + toUpperCase(element->Attribute("platform")) + "_" + element->Attribute("author");
}
#if !defined(NDEBUG) #if !defined(NDEBUG)
assert(vkData.extensions.find(name) == vkData.extensions.end()); assert(vkData.extensions.find(name) == vkData.extensions.end());
@ -1763,7 +1935,7 @@ void readExtensionType(tinyxml2::XMLElement * element, VkData & vkData, std::str
std::string enumName = generateEnumNameForFlags(name); std::string enumName = generateEnumNameForFlags(name);
std::map<std::string, EnumData>::iterator eit = vkData.enums.find(enumName); std::map<std::string, EnumData>::iterator eit = vkData.enums.find(enumName);
assert(eit != vkData.enums.end()); assert(eit != vkData.enums.end());
if (eit->second.members.empty()) if (eit->second.values.empty())
{ {
eit->second.protect = protect; eit->second.protect = protect;
} }
@ -1785,21 +1957,69 @@ void readExtensionType(tinyxml2::XMLElement * element, VkData & vkData, std::str
else else
{ {
std::map<std::string, StructData>::iterator stit = vkData.structs.find(name); std::map<std::string, StructData>::iterator stit = vkData.structs.find(name);
assert(stit != vkData.structs.end() && stit->second.protect.empty()); if (stit != vkData.structs.end())
{
stit->second.protect = protect; stit->second.protect = protect;
} }
else
{
assert(vkData.defines.find(name) != vkData.defines.end());
} }
} }
} }
} }
} }
}
}
void readFeature(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums)
{
assert(element->Attribute("api") && (strcmp(element->Attribute("api"), "vulkan") == 0));
for (tinyxml2::XMLElement * child = element->FirstChildElement(); child; child = child->NextSiblingElement())
{
assert(child->Value());
std::string value = child->Value();
assert(value == "require");
readFeatureRequire(child, enums);
}
}
void readFeatureRequire(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums)
{
for (tinyxml2::XMLElement * child = element->FirstChildElement(); child; child = child->NextSiblingElement())
{
assert(child->Value());
std::string value = child->Value();
if (value == "enum")
{
readFeatureRequireEnum(child, enums);
}
else
{
assert((value == "command") || (value == "type"));
}
}
}
void readFeatureRequireEnum(tinyxml2::XMLElement * element, std::map<std::string, EnumData> & enums)
{
if (element->Attribute("extends"))
{
assert((strncmp(element->Attribute("extends"), "Vk", 2) == 0) && element->Attribute("name"));
std::string extends = strip(element->Attribute("extends"), "Vk");
auto enumIt = enums.find(extends);
assert(enumIt != enums.end());
enumIt->second.addEnumValue(element->Attribute("name"), "");
}
}
tinyxml2::XMLNode* readType(tinyxml2::XMLNode* element, std::string & type, std::string & pureType) tinyxml2::XMLNode* readType(tinyxml2::XMLNode* element, std::string & type, std::string & pureType)
{ {
assert(element); assert(element);
if (element->ToText()) if (element->ToText())
{ {
std::string value = trimEnd(element->Value()); std::string value = trim(element->Value());
assert((value == "const") || (value == "struct")); assert((value == "const") || (value == "struct"));
type = value + " "; type = value + " ";
element = element->NextSibling(); element = element->NextSibling();
@ -1897,6 +2117,12 @@ void readTypeDefine( tinyxml2::XMLElement * element, VkData & vkData )
size_t end = text.find_first_of("\r\n", start + 1); size_t end = text.find_first_of("\r\n", start + 1);
vkData.typesafeCheck = text.substr(start, end - start); vkData.typesafeCheck = text.substr(start, end - start);
} }
else if (element->GetText() && (trim(element->GetText()) == "struct"))
{
assert(child && (strcmp(child->Value(), "name") == 0) && child->GetText());
vkData.defines.insert(child->GetText());
vkData.dependencies.push_back(DependencyData(DependencyData::Category::REQUIRED, child->GetText()));
}
// ignore all the other defines // ignore all the other defines
} }
@ -1978,7 +2204,6 @@ void readTypeStruct( tinyxml2::XMLElement * element, VkData & vkData, bool isUni
void readTypeStructMember(tinyxml2::XMLElement * element, VkData & vkData, StructData & structData) void readTypeStructMember(tinyxml2::XMLElement * element, VkData & vkData, StructData & structData)
{ {
structData.members.push_back(MemberData()); structData.members.push_back(MemberData());
MemberData & member = structData.members.back(); MemberData & member = structData.members.back();
@ -2008,39 +2233,49 @@ void readTypes(tinyxml2::XMLElement * element, VkData & vkData)
{ {
assert(child->Value()); assert(child->Value());
std::string value = child->Value(); std::string value = child->Value();
assert((value == "comment") || (value == "type"));
if (value == "type") if (value == "type")
{ {
if (child->Attribute("category")) readTypesType(child, vkData);
}
else
{ {
std::string category = child->Attribute("category"); assert(value == "comment");
}
}
}
void readTypesType(tinyxml2::XMLElement * element, VkData & vkData)
{
if (element->Attribute("category"))
{
std::string category = element->Attribute("category");
if (category == "basetype") if (category == "basetype")
{ {
readTypeBasetype(child, vkData.dependencies); readTypeBasetype(element, vkData.dependencies);
} }
else if (category == "bitmask") else if (category == "bitmask")
{ {
readTypeBitmask(child, vkData); readTypeBitmask(element, vkData);
} }
else if (category == "define") else if (category == "define")
{ {
readTypeDefine(child, vkData); readTypeDefine(element, vkData);
} }
else if (category == "funcpointer") else if (category == "funcpointer")
{ {
readTypeFuncpointer(child, vkData.dependencies); readTypeFuncpointer(element, vkData.dependencies);
} }
else if (category == "handle") else if (category == "handle")
{ {
readTypeHandle(child, vkData); readTypeHandle(element, vkData);
} }
else if (category == "struct") else if (category == "struct")
{ {
readTypeStruct(child, vkData, false); readTypeStruct(element, vkData, false);
} }
else if (category == "union") else if (category == "union")
{ {
readTypeStruct(child, vkData, true); readTypeStruct(element, vkData, true);
} }
else else
{ {
@ -2049,10 +2284,8 @@ void readTypes(tinyxml2::XMLElement * element, VkData & vkData)
} }
else else
{ {
assert(child->Attribute("name")); assert(element->Attribute("name"));
vkData.dependencies.push_back(DependencyData(DependencyData::Category::REQUIRED, child->Attribute("name"))); vkData.dependencies.push_back(DependencyData(DependencyData::Category::REQUIRED, element->Attribute("name")));
}
}
} }
} }
@ -2095,8 +2328,8 @@ void registerDeleter(VkData & vkData, CommandData const& commandData)
case 4: case 4:
key = commandData.params[0].pureType; key = commandData.params[0].pureType;
valueIndex = 3; valueIndex = 3;
assert(vkData.deleterData.find(commandData.params[valueIndex].pureType) == vkData.deleterData.end()); assert(vkData.deleters.find(commandData.params[valueIndex].pureType) == vkData.deleters.end());
vkData.deleterData[commandData.params[valueIndex].pureType].pool = commandData.params[1].pureType; vkData.deleters[commandData.params[valueIndex].pureType].pool = commandData.params[1].pureType;
break; break;
default: default:
assert(false); assert(false);
@ -2107,7 +2340,7 @@ void registerDeleter(VkData & vkData, CommandData const& commandData)
} }
assert(vkData.deleterTypes[key].find(commandData.params[valueIndex].pureType) == vkData.deleterTypes[key].end()); assert(vkData.deleterTypes[key].find(commandData.params[valueIndex].pureType) == vkData.deleterTypes[key].end());
vkData.deleterTypes[key].insert(commandData.params[valueIndex].pureType); vkData.deleterTypes[key].insert(commandData.params[valueIndex].pureType);
vkData.deleterData[commandData.params[valueIndex].pureType].call = commandData.reducedName; vkData.deleters[commandData.params[valueIndex].pureType].call = commandData.reducedName;
} }
} }
@ -2175,14 +2408,24 @@ std::string startUpperCase(std::string const& input)
return static_cast<char>(toupper(input[0])) + input.substr(1); return static_cast<char>(toupper(input[0])) + input.substr(1);
} }
bool beginsWith(std::string const& text, std::string const& prefix)
{
return !prefix.empty() && text.substr(0, prefix.length()) == prefix;
}
bool endsWith(std::string const& text, std::string const& postfix)
{
return !postfix.empty() && (postfix.length() < text.length()) && (text.substr(text.length() - postfix.length()) == postfix);
}
std::string strip(std::string const& value, std::string const& prefix, std::string const& postfix) std::string strip(std::string const& value, std::string const& prefix, std::string const& postfix)
{ {
std::string strippedValue = value; std::string strippedValue = value;
if (strippedValue.substr(0, prefix.length()) == prefix) if (beginsWith(strippedValue, prefix))
{ {
strippedValue.erase(0, prefix.length()); strippedValue.erase(0, prefix.length());
} }
if (!postfix.empty() && (strippedValue.substr(strippedValue.length() - postfix.length()) == postfix)) if (endsWith(strippedValue, postfix))
{ {
strippedValue.erase(strippedValue.length() - postfix.length()); strippedValue.erase(strippedValue.length() - postfix.length());
} }
@ -2236,7 +2479,6 @@ std::vector<std::string> tokenize(std::string tokenString, char separator)
std::string toUpperCase(std::string const& name) std::string toUpperCase(std::string const& name)
{ {
assert(isupper(name.front()));
std::string convertedName; std::string convertedName;
for (size_t i = 0; i<name.length(); i++) for (size_t i = 0; i<name.length(); i++)
@ -2250,6 +2492,14 @@ std::string toUpperCase(std::string const& name)
return convertedName; return convertedName;
} }
std::string trim(std::string const& input)
{
std::string result = input;
result.erase(result.begin(), std::find_if(result.begin(), result.end(), [](char c) { return !std::isspace(c); }));
result.erase(std::find_if(result.rbegin(), result.rend(), [](char c) { return !std::isspace(c); }).base(), result.end());
return result;
}
// trim from end // trim from end
std::string trimEnd(std::string const& input) std::string trimEnd(std::string const& input)
{ {
@ -2299,9 +2549,7 @@ void writeCall(std::ostream & os, CommandData const& commandData, std::set<std::
{ {
writeCallVectorParameter(os, commandData, vkTypes, firstCall, singular, it); writeCallVectorParameter(os, commandData, vkTypes, firstCall, singular, it);
} }
else else if (vkTypes.find(commandData.params[i].pureType) != vkTypes.end())
{
if (vkTypes.find(commandData.params[i].pureType) != vkTypes.end())
{ {
writeCallVulkanTypeParameter(os, commandData.params[i]); writeCallVulkanTypeParameter(os, commandData.params[i]);
} }
@ -2310,7 +2558,6 @@ void writeCall(std::ostream & os, CommandData const& commandData, std::set<std::
writeCallPlainTypeParameter(os, commandData.params[i]); writeCallPlainTypeParameter(os, commandData.params[i]);
} }
} }
}
os << " )"; os << " )";
} }
@ -2666,7 +2913,6 @@ void writeFunctionBodyEnhancedLocalCountVariable(std::ostream & os, std::string
std::string writeFunctionBodyEnhancedLocalReturnVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool isStructureChain) std::string writeFunctionBodyEnhancedLocalReturnVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool isStructureChain)
{ {
bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end());
std::string returnName = startLowerCase(strip(commandData.params[commandData.returnParam].name, "p")); std::string returnName = startLowerCase(strip(commandData.params[commandData.returnParam].name, "p"));
// there is a returned parameter -> we need a local variable to hold that value // there is a returned parameter -> we need a local variable to hold that value
@ -2738,11 +2984,7 @@ std::string writeFunctionBodyEnhancedLocalReturnVariable(std::ostream & os, std:
} }
} }
assert(!size.empty()); assert(!size.empty());
os << "( " << size << (returnsVector ? ", {}, {alloc} )" : " )"); os << "( " << size << " )";
}
else if ( returnsVector )
{
os << "( {alloc} )";
} }
} }
os << ";" << std::endl; os << ";" << std::endl;
@ -2890,15 +3132,15 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation,
std::string type = commandData.params[commandData.returnParam].pureType; std::string type = commandData.params[commandData.returnParam].pureType;
std::string typeValue = startLowerCase(type); std::string typeValue = startLowerCase(type);
os << indentation << " " << type << "Deleter deleter( "; os << indentation << " " << type << "Deleter deleter( ";
if (vkData.deleterData.find(commandData.className) != vkData.deleterData.end()) if (vkData.deleters.find(commandData.className) != vkData.deleters.end())
{ {
// if the Deleter is specific to the command's class, add '*this' to the deleter // if the Deleter is specific to the command's class, add '*this' to the deleter
os << "*this, "; os << "*this, ";
} }
// get the DeleterData corresponding to the returned type // get the DeleterData corresponding to the returned type
std::map<std::string, DeleterData>::const_iterator ddit = vkData.deleterData.find(type); std::map<std::string, DeleterData>::const_iterator ddit = vkData.deleters.find(type);
assert(ddit != vkData.deleterData.end()); assert(ddit != vkData.deleters.end());
if (ddit->second.pool.empty()) if (ddit->second.pool.empty())
{ {
// if this type isn't pooled, use the allocator (provided as a function argument) // if this type isn't pooled, use the allocator (provided as a function argument)
@ -2946,14 +3188,7 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation,
os << argumentName; os << argumentName;
} }
} }
if (returnsVector)
{
os << ", alloc";
}
os << " )"; os << " )";
if (returnsVector) if (returnsVector)
{ {
std::string const stringTemplate = R"(; std::string const stringTemplate = R"(;
@ -2998,8 +3233,6 @@ void writeFunctionHeaderArguments(std::ostream & os, VkData const& vkData, Comma
void writeFunctionHeaderArgumentsEnhanced(std::ostream & os, VkData const& vkData, CommandData const& commandData, bool singular, bool withDefaults) void writeFunctionHeaderArgumentsEnhanced(std::ostream & os, VkData const& vkData, CommandData const& commandData, bool singular, bool withDefaults)
{ {
bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end());
// check if there's at least one argument left to put in here // check if there's at least one argument left to put in here
if (commandData.skippedParams.size() + (commandData.className.empty() ? 0 : 1) < commandData.params.size()) if (commandData.skippedParams.size() + (commandData.className.empty() ? 0 : 1) < commandData.params.size())
{ {
@ -3051,7 +3284,7 @@ void writeFunctionHeaderArgumentsEnhanced(std::ostream & os, VkData const& vkDat
assert((depIt != vkData.dependencies.end()) && (depIt->dependencies.size() == 1)); assert((depIt != vkData.dependencies.end()) && (depIt->dependencies.size() == 1));
std::map<std::string, EnumData>::const_iterator enumIt = vkData.enums.find(*depIt->dependencies.begin()); std::map<std::string, EnumData>::const_iterator enumIt = vkData.enums.find(*depIt->dependencies.begin());
assert(enumIt != vkData.enums.end()); assert(enumIt != vkData.enums.end());
if (enumIt->second.members.empty()) if (enumIt->second.values.empty())
{ {
// there are no bits in this flag -> provide the default // there are no bits in this flag -> provide the default
os << " = " << commandData.params[i].pureType << "()"; os << " = " << commandData.params[i].pureType << "()";
@ -3131,16 +3364,7 @@ void writeFunctionHeaderArgumentsEnhanced(std::ostream & os, VkData const& vkDat
argEncountered = true; argEncountered = true;
} }
} }
os << " ";
os << (returnsVector ? ", " : " ");
}
if (returnsVector)
{
os << "Allocator const & alloc ";
if (withDefaults) {
os << "= Allocator() ";
}
} }
} }
@ -3462,9 +3686,9 @@ void writeTypeCommand(std::ostream & os, VkData const& vkData, DependencyData co
auto deleterTypesIt = vkData.deleterTypes.find(""); auto deleterTypesIt = vkData.deleterTypes.find("");
assert((deleterTypesIt != vkData.deleterTypes.end()) && (deleterTypesIt->second.size() == 1)); assert((deleterTypesIt != vkData.deleterTypes.end()) && (deleterTypesIt->second.size() == 1));
writeDeleterForwardDeclarations(os, *deleterTypesIt, vkData.deleterData); writeDeleterForwardDeclarations(os, *deleterTypesIt, vkData.deleters);
writeTypeCommand(os, " ", vkData, commandData, false); writeTypeCommand(os, " ", vkData, commandData, false);
writeDeleterClasses(os, *deleterTypesIt, vkData.deleterData); writeDeleterClasses(os, *deleterTypesIt, vkData.deleters);
} }
else else
{ {
@ -3506,7 +3730,7 @@ void writeTypeCommand(std::ostream & os, std::string const& indentation, VkData
bool specialWriteUnique = (commandData.reducedName == "createDevice") || (commandData.reducedName == "createInstance"); bool specialWriteUnique = (commandData.reducedName == "createDevice") || (commandData.reducedName == "createInstance");
// and then the same for the Unique* versions (a Deleter is available for the commandData's class, and the function starts with 'allocate' or 'create') // and then the same for the Unique* versions (a Deleter is available for the commandData's class, and the function starts with 'allocate' or 'create')
if (((vkData.deleterData.find(commandData.className) != vkData.deleterData.end()) || specialWriteUnique) && ((commandData.reducedName.substr(0, 8) == "allocate") || (commandData.reducedName.substr(0, 6) == "create"))) if (((vkData.deleters.find(commandData.className) != vkData.deleters.end()) || specialWriteUnique) && ((commandData.reducedName.substr(0, 8) == "allocate") || (commandData.reducedName.substr(0, 6) == "create")))
{ {
enhanced << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; enhanced << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl;
writeFunction(enhanced, indentation, vkData, commandData, definition, true, false, true, false); writeFunction(enhanced, indentation, vkData, commandData, definition, true, false, true, false);
@ -3530,16 +3754,28 @@ void writeTypeEnum( std::ostream & os, EnumData const& enumData )
enterProtect(os, enumData.protect); enterProtect(os, enumData.protect);
os << " enum class " << enumData.name << std::endl os << " enum class " << enumData.name << std::endl
<< " {" << std::endl; << " {" << std::endl;
for ( size_t i=0 ; i<enumData.members.size() ; i++ ) for ( size_t i=0 ; i<enumData.values.size() ; i++ )
{ {
os << " " << enumData.members[i].name << " = " << enumData.members[i].value; os << " " << enumData.values[i].name << " = " << enumData.values[i].value;
if ( i < enumData.members.size() - 1 ) if (!enumData.values[i].alias.empty())
{
os << "," << std::endl
<< " " << enumData.values[i].alias << " = " << enumData.values[i].value;
}
if (i < enumData.values.size() - 1)
{ {
os << ","; os << ",";
} }
os << std::endl; os << std::endl;
} }
os << " };" << std::endl; os << " };" << std::endl;
if (!enumData.alias.empty())
{
os << std::endl
<< " using " << enumData.alias << " = " << enumData.name << ";" << std::endl;
}
leaveProtect(os, enumData.protect); leaveProtect(os, enumData.protect);
os << std::endl; os << std::endl;
} }
@ -3570,16 +3806,16 @@ R"( class ${className} : public SystemError
)"; )";
enterProtect(os, enumData.protect); enterProtect(os, enumData.protect);
for (size_t i = 0; i < enumData.members.size(); i++) for (size_t i = 0; i < enumData.values.size(); i++)
{ {
if (!isErrorEnum(enumData.members[i].name)) if (!isErrorEnum(enumData.values[i].name))
{ {
continue; continue;
} }
os << replaceWithMap(templateString, os << replaceWithMap(templateString,
{ { "className", stripErrorEnumPrefix(enumData.members[i].name) + "Error"}, { { "className", stripErrorEnumPrefix(enumData.values[i].name) + "Error"},
{ "enumName", enumData.name}, { "enumName", enumData.name},
{ "enumMemberName", enumData.members[i].name} { "enumMemberName", enumData.values[i].name}
}); });
} }
leaveProtect(os, enumData.protect); leaveProtect(os, enumData.protect);
@ -3596,14 +3832,14 @@ R"( VULKAN_HPP_INLINE void throwResultException( Result result, char const * me
switch ( result ) switch ( result )
{ {
)"; )";
for ( size_t i=0 ; i<enumData.members.size() ; i++ ) for ( size_t i=0 ; i<enumData.values.size() ; i++ )
{ {
if (!isErrorEnum(enumData.members[i].name)) if (!isErrorEnum(enumData.values[i].name))
{ {
continue; continue;
} }
const std::string strippedExceptionName = stripErrorEnumPrefix(enumData.members[i].name); const std::string strippedExceptionName = stripErrorEnumPrefix(enumData.values[i].name);
os << " case " << enumData.name << "::" << enumData.members[i].name << ": " os << " case " << enumData.name << "::" << enumData.values[i].name << ": "
<< "throw " << strippedExceptionName << "Error ( message );" << std::endl; << "throw " << strippedExceptionName << "Error ( message );" << std::endl;
} }
os << os <<
@ -3614,7 +3850,7 @@ R"( default: throw SystemError( make_error_code( result ) );
leaveProtect(os, enumData.protect); leaveProtect(os, enumData.protect);
} }
void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleterData) void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleters)
{ {
// A Deleter class for each of the Unique* classes... but only if smart handles are not switched off // A Deleter class for each of the Unique* classes... but only if smart handles are not switched off
os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl;
@ -3647,8 +3883,8 @@ void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std:
} }
// if this Deleter is pooled, make such a pool the last argument, otherwise an Optional allocator // if this Deleter is pooled, make such a pool the last argument, otherwise an Optional allocator
auto const& dd = deleterData.find(deleterType); auto const& dd = deleters.find(deleterType);
assert(dd != deleterData.end()); assert(dd != deleters.end());
std::string poolName = (dd->second.pool.empty() ? "" : startLowerCase(dd->second.pool)); std::string poolName = (dd->second.pool.empty() ? "" : startLowerCase(dd->second.pool));
if (poolName.empty()) if (poolName.empty())
{ {
@ -3748,7 +3984,7 @@ void writeDeleterClasses(std::ostream & os, std::pair<std::string, std::set<std:
<< std::endl; << std::endl;
} }
void writeDeleterForwardDeclarations(std::ostream &os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleterData) void writeDeleterForwardDeclarations(std::ostream &os, std::pair<std::string, std::set<std::string>> const& deleterTypes, std::map<std::string, DeleterData> const& deleters)
{ {
// if smart handles are supported, all the Deleter classes need to be forward declared // if smart handles are supported, all the Deleter classes need to be forward declared
os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; os << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl;
@ -3767,9 +4003,9 @@ void writeEnumsToString(std::ostream & os, EnumData const& enumData)
{ {
// the helper functions to make strings out of enum values // the helper functions to make strings out of enum values
enterProtect(os, enumData.protect); enterProtect(os, enumData.protect);
os << " VULKAN_HPP_INLINE std::string to_string(" << enumData.name << (enumData.members.empty() ? ")" : " value)") << std::endl os << " VULKAN_HPP_INLINE std::string to_string(" << enumData.name << (enumData.values.empty() ? ")" : " value)") << std::endl
<< " {" << std::endl; << " {" << std::endl;
if (enumData.members.empty()) if (enumData.values.empty())
{ {
// no enum values in this enum -> return "(void)" // no enum values in this enum -> return "(void)"
os << " return \"(void)\";" << std::endl; os << " return \"(void)\";" << std::endl;
@ -3779,9 +4015,9 @@ void writeEnumsToString(std::ostream & os, EnumData const& enumData)
// otherwise switch over the value and return the a stringized version of that value (without leading 'e') // otherwise switch over the value and return the a stringized version of that value (without leading 'e')
os << " switch (value)" << std::endl os << " switch (value)" << std::endl
<< " {" << std::endl; << " {" << std::endl;
for (auto const& member : enumData.members) for (auto const& value : enumData.values)
{ {
os << " case " << enumData.name << "::" << member.name << ": return \"" << member.name.substr(1) << "\";" << std::endl; os << " case " << enumData.name << "::" << value.name << ": return \"" << value.name.substr(1) << "\";" << std::endl;
} }
os << " default: return \"invalid\";" << std::endl os << " default: return \"invalid\";" << std::endl
<< " }" << std::endl; << " }" << std::endl;
@ -3795,9 +4031,9 @@ void writeFlagsToString(std::ostream & os, std::string const& flagsName, EnumDat
{ {
// the helper functions to make strings out of flag values // the helper functions to make strings out of flag values
enterProtect(os, enumData.protect); enterProtect(os, enumData.protect);
os << " VULKAN_HPP_INLINE std::string to_string(" << flagsName << (enumData.members.empty() ? ")" : " value)") << std::endl os << " VULKAN_HPP_INLINE std::string to_string(" << flagsName << (enumData.values.empty() ? ")" : " value)") << std::endl
<< " {" << std::endl; << " {" << std::endl;
if (enumData.members.empty()) if (enumData.values.empty())
{ {
// no flags values in this enum -> return "{}" // no flags values in this enum -> return "{}"
os << " return \"{}\";" << std::endl; os << " return \"{}\";" << std::endl;
@ -3808,9 +4044,9 @@ void writeFlagsToString(std::ostream & os, std::string const& flagsName, EnumDat
<< " std::string result;" << std::endl; << " std::string result;" << std::endl;
// 'or' together all the bits in the value // 'or' together all the bits in the value
for (auto itMember = enumData.members.begin(); itMember != enumData.members.end(); ++itMember) for (auto valuesIt = enumData.values.begin(); valuesIt != enumData.values.end(); ++valuesIt)
{ {
os << " if (value & " << enumData.name << "::" << itMember->name << ") result += \"" << itMember->name.substr(1) << " | \";" << std::endl; os << " if (value & " << enumData.name << "::" << valuesIt->name << ") result += \"" << valuesIt->name.substr(1) << " | \";" << std::endl;
} }
// cut off the last three characters from the result (being " | ") // cut off the last three characters from the result (being " | ")
os << " return \"{\" + result.substr(0, result.size() - 3) + \"}\";" << std::endl; os << " return \"{\" + result.substr(0, result.size() - 3) + \"}\";" << std::endl;
@ -3827,16 +4063,16 @@ void writeTypeFlags(std::ostream & os, std::string const& flagsName, FlagData co
os << " using " << flagsName << " = Flags<" << enumData.name << ", Vk" << flagsName << ">;" << std::endl; os << " using " << flagsName << " = Flags<" << enumData.name << ", Vk" << flagsName << ">;" << std::endl;
std::stringstream allFlags; std::stringstream allFlags;
for (size_t i = 0; i < enumData.members.size(); i++) for (size_t i = 0; i < enumData.values.size(); i++)
{ {
if (i != 0) if (i != 0)
{ {
allFlags << " | "; allFlags << " | ";
} }
allFlags << "VkFlags(" << enumData.name << "::" << enumData.members[i].name << ")"; allFlags << "VkFlags(" << enumData.name << "::" << enumData.values[i].name << ")";
} }
if (!enumData.members.empty()) if (!enumData.values.empty())
{ {
const std::string templateString = R"( const std::string templateString = R"(
VULKAN_HPP_INLINE ${flagsName} operator|( ${enumName} bit0, ${enumName} bit1 ) VULKAN_HPP_INLINE ${flagsName} operator|( ${enumName} bit0, ${enumName} bit1 )
@ -3859,6 +4095,13 @@ void writeTypeFlags(std::ostream & os, std::string const& flagsName, FlagData co
)"; )";
os << replaceWithMap(templateString, { { "flagsName", flagsName}, { "enumName", enumData.name }, { "allFlags", allFlags.str() } } ); os << replaceWithMap(templateString, { { "flagsName", flagsName}, { "enumName", enumData.name }, { "allFlags", allFlags.str() } } );
} }
if (!flagData.alias.empty())
{
os << std::endl
<< " using " << flagData.alias << " = " << flagsName << ";" << std::endl;
}
leaveProtect(os, flagData.protect); leaveProtect(os, flagData.protect);
os << std::endl; os << std::endl;
} }
@ -3883,7 +4126,7 @@ void writeTypeHandle(std::ostream & os, VkData const& vkData, DependencyData con
std::map<std::string, std::set<std::string>>::const_iterator deleterTypesIt = vkData.deleterTypes.find(dependencyData.name); std::map<std::string, std::set<std::string>>::const_iterator deleterTypesIt = vkData.deleterTypes.find(dependencyData.name);
if (deleterTypesIt != vkData.deleterTypes.end()) if (deleterTypesIt != vkData.deleterTypes.end())
{ {
writeDeleterForwardDeclarations(os, *deleterTypesIt, vkData.deleterData); writeDeleterForwardDeclarations(os, *deleterTypesIt, vkData.deleters);
} }
const std::string memberName = startLowerCase(dependencyData.name); const std::string memberName = startLowerCase(dependencyData.name);
@ -3973,11 +4216,17 @@ ${commands}
{ "commands", commands.str() } { "commands", commands.str() }
}); });
if (!handleData.alias.empty())
{
os << std::endl
<< " using " << handleData.alias << " = " << dependencyData.name << ";" << std::endl;
}
// then the actual Deleter classes can be listed // then the actual Deleter classes can be listed
deleterTypesIt = vkData.deleterTypes.find(dependencyData.name); deleterTypesIt = vkData.deleterTypes.find(dependencyData.name);
if (deleterTypesIt != vkData.deleterTypes.end()) if (deleterTypesIt != vkData.deleterTypes.end())
{ {
writeDeleterClasses(os, *deleterTypesIt, vkData.deleterData); writeDeleterClasses(os, *deleterTypesIt, vkData.deleters);
} }
// and finally the commands, that are member functions of this handle // and finally the commands, that are member functions of this handle
@ -4105,6 +4354,12 @@ void writeTypeStruct( std::ostream & os, VkData const& vkData, DependencyData co
os << " };" << std::endl os << " };" << std::endl
<< " static_assert( sizeof( " << dependencyData.name << " ) == sizeof( Vk" << dependencyData.name << " ), \"struct and wrapper have different size!\" );" << std::endl; << " static_assert( sizeof( " << dependencyData.name << " ) == sizeof( Vk" << dependencyData.name << " ), \"struct and wrapper have different size!\" );" << std::endl;
if (!it->second.alias.empty())
{
os << std::endl
<< " using " << it->second.alias << " = " << it->first << ";" << std::endl;
}
leaveProtect(os, it->second.protect); leaveProtect(os, it->second.protect);
os << std::endl; os << std::endl;
} }
@ -4347,6 +4602,10 @@ int main( int argc, char **argv )
{ {
readExtensions(child, vkData); readExtensions(child, vkData);
} }
else if (value == "feature")
{
readFeature(child, vkData.enums);
}
else if (value == "tags") else if (value == "tags")
{ {
readTags(child, vkData.tags); readTags(child, vkData.tags);
@ -4357,7 +4616,7 @@ int main( int argc, char **argv )
} }
else else
{ {
assert((value == "feature") || (value == "vendorids")); assert(value == "vendorids");
} }
} }

@ -1 +1 @@
Subproject commit c8dad95d4488663c0381d502b3274df7dbf2fc55 Subproject commit 8b83b238767ca1fdaaf73b3f4a1b98c4512a54bb

View File

@ -33,7 +33,7 @@
# include <memory> # include <memory>
# include <vector> # include <vector>
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
static_assert( VK_HEADER_VERSION == 62 , "Wrong VK_HEADER_VERSION!" ); static_assert( VK_HEADER_VERSION == 64 , "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION // To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
@ -542,7 +542,8 @@ namespace VULKAN_HPP_NAMESPACE
eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT, eErrorValidationFailedEXT = VK_ERROR_VALIDATION_FAILED_EXT,
eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV, eErrorInvalidShaderNV = VK_ERROR_INVALID_SHADER_NV,
eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR, eErrorOutOfPoolMemoryKHR = VK_ERROR_OUT_OF_POOL_MEMORY_KHR,
eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR eErrorInvalidExternalHandleKHR = VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
eErrorNotPermittedEXT = VK_ERROR_NOT_PERMITTED_EXT
}; };
VULKAN_HPP_INLINE std::string to_string(Result value) VULKAN_HPP_INLINE std::string to_string(Result value)
@ -576,6 +577,7 @@ namespace VULKAN_HPP_NAMESPACE
case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV"; case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV";
case Result::eErrorOutOfPoolMemoryKHR: return "ErrorOutOfPoolMemoryKHR"; case Result::eErrorOutOfPoolMemoryKHR: return "ErrorOutOfPoolMemoryKHR";
case Result::eErrorInvalidExternalHandleKHR: return "ErrorInvalidExternalHandleKHR"; case Result::eErrorInvalidExternalHandleKHR: return "ErrorInvalidExternalHandleKHR";
case Result::eErrorNotPermittedEXT: return "ErrorNotPermittedEXT";
default: return "invalid"; default: return "invalid";
} }
} }
@ -820,6 +822,14 @@ namespace VULKAN_HPP_NAMESPACE
InvalidExternalHandleKHRError( char const * message ) InvalidExternalHandleKHRError( char const * message )
: SystemError( make_error_code( Result::eErrorInvalidExternalHandleKHR ), message ) {} : SystemError( make_error_code( Result::eErrorInvalidExternalHandleKHR ), message ) {}
}; };
class NotPermittedEXTError : public SystemError
{
public:
NotPermittedEXTError( std::string const& message )
: SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {}
NotPermittedEXTError( char const * message )
: SystemError( make_error_code( Result::eErrorNotPermittedEXT ), message ) {}
};
VULKAN_HPP_INLINE void throwResultException( Result result, char const * message ) VULKAN_HPP_INLINE void throwResultException( Result result, char const * message )
{ {
@ -846,6 +856,7 @@ namespace VULKAN_HPP_NAMESPACE
case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError ( message ); case Result::eErrorInvalidShaderNV: throw InvalidShaderNVError ( message );
case Result::eErrorOutOfPoolMemoryKHR: throw OutOfPoolMemoryKHRError ( message ); case Result::eErrorOutOfPoolMemoryKHR: throw OutOfPoolMemoryKHRError ( message );
case Result::eErrorInvalidExternalHandleKHR: throw InvalidExternalHandleKHRError ( message ); case Result::eErrorInvalidExternalHandleKHR: throw InvalidExternalHandleKHRError ( message );
case Result::eErrorNotPermittedEXT: throw NotPermittedEXTError ( message );
default: throw SystemError( make_error_code( result ) ); default: throw SystemError( make_error_code( result ) );
} }
} }
@ -5557,6 +5568,35 @@ namespace VULKAN_HPP_NAMESPACE
}; };
static_assert( sizeof( SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" ); static_assert( sizeof( SampleLocationEXT ) == sizeof( VkSampleLocationEXT ), "struct and wrapper have different size!" );
struct ShaderResourceUsageAMD
{
operator const VkShaderResourceUsageAMD&() const
{
return *reinterpret_cast<const VkShaderResourceUsageAMD*>(this);
}
bool operator==( ShaderResourceUsageAMD const& rhs ) const
{
return ( numUsedVgprs == rhs.numUsedVgprs )
&& ( numUsedSgprs == rhs.numUsedSgprs )
&& ( ldsSizePerLocalWorkGroup == rhs.ldsSizePerLocalWorkGroup )
&& ( ldsUsageSizeInBytes == rhs.ldsUsageSizeInBytes )
&& ( scratchMemUsageInBytes == rhs.scratchMemUsageInBytes );
}
bool operator!=( ShaderResourceUsageAMD const& rhs ) const
{
return !operator==( rhs );
}
uint32_t numUsedVgprs;
uint32_t numUsedSgprs;
uint32_t ldsSizePerLocalWorkGroup;
size_t ldsUsageSizeInBytes;
size_t scratchMemUsageInBytes;
};
static_assert( sizeof( ShaderResourceUsageAMD ) == sizeof( VkShaderResourceUsageAMD ), "struct and wrapper have different size!" );
enum class ImageLayout enum class ImageLayout
{ {
eUndefined = VK_IMAGE_LAYOUT_UNDEFINED, eUndefined = VK_IMAGE_LAYOUT_UNDEFINED,
@ -6887,7 +6927,8 @@ namespace VULKAN_HPP_NAMESPACE
eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR, eBindBufferMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR,
eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR, eBindImageMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR,
eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, eValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT,
eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT eShaderModuleValidationCacheCreateInfoEXT = VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT,
eDeviceQueueGlobalPriorityCreateInfoEXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT
}; };
struct ApplicationInfo struct ApplicationInfo
@ -15140,6 +15181,39 @@ namespace VULKAN_HPP_NAMESPACE
}; };
static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" ); static_assert( sizeof( PipelineLayoutCreateInfo ) == sizeof( VkPipelineLayoutCreateInfo ), "struct and wrapper have different size!" );
struct ShaderStatisticsInfoAMD
{
operator const VkShaderStatisticsInfoAMD&() const
{
return *reinterpret_cast<const VkShaderStatisticsInfoAMD*>(this);
}
bool operator==( ShaderStatisticsInfoAMD const& rhs ) const
{
return ( shaderStageMask == rhs.shaderStageMask )
&& ( resourceUsage == rhs.resourceUsage )
&& ( numPhysicalVgprs == rhs.numPhysicalVgprs )
&& ( numPhysicalSgprs == rhs.numPhysicalSgprs )
&& ( numAvailableVgprs == rhs.numAvailableVgprs )
&& ( numAvailableSgprs == rhs.numAvailableSgprs )
&& ( memcmp( computeWorkGroupSize, rhs.computeWorkGroupSize, 3 * sizeof( uint32_t ) ) == 0 );
}
bool operator!=( ShaderStatisticsInfoAMD const& rhs ) const
{
return !operator==( rhs );
}
ShaderStageFlags shaderStageMask;
ShaderResourceUsageAMD resourceUsage;
uint32_t numPhysicalVgprs;
uint32_t numPhysicalSgprs;
uint32_t numAvailableVgprs;
uint32_t numAvailableSgprs;
uint32_t computeWorkGroupSize[3];
};
static_assert( sizeof( ShaderStatisticsInfoAMD ) == sizeof( VkShaderStatisticsInfoAMD ), "struct and wrapper have different size!" );
enum class ImageUsageFlagBits enum class ImageUsageFlagBits
{ {
eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT, eTransferSrc = VK_IMAGE_USAGE_TRANSFER_SRC_BIT,
@ -25574,10 +25648,82 @@ namespace VULKAN_HPP_NAMESPACE
eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT eOne = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT
}; };
enum class ShaderInfoTypeAMD
{
eStatistics = VK_SHADER_INFO_TYPE_STATISTICS_AMD,
eBinary = VK_SHADER_INFO_TYPE_BINARY_AMD,
eDisassembly = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD
};
enum class QueueGlobalPriorityEXT
{
eLow = VK_QUEUE_GLOBAL_PRIORITY_LOW,
eMedium = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM,
eHigh = VK_QUEUE_GLOBAL_PRIORITY_HIGH,
eRealtime = VK_QUEUE_GLOBAL_PRIORITY_REALTIME
};
struct DeviceQueueGlobalPriorityCreateInfoEXT
{
DeviceQueueGlobalPriorityCreateInfoEXT( QueueGlobalPriorityEXT globalPriority_ = QueueGlobalPriorityEXT::eLow )
: sType( StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT )
, pNext( nullptr )
, globalPriority( globalPriority_ )
{
}
DeviceQueueGlobalPriorityCreateInfoEXT( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs )
{
memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) );
}
DeviceQueueGlobalPriorityCreateInfoEXT& operator=( VkDeviceQueueGlobalPriorityCreateInfoEXT const & rhs )
{
memcpy( this, &rhs, sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) );
return *this;
}
DeviceQueueGlobalPriorityCreateInfoEXT& setPNext( const void* pNext_ )
{
pNext = pNext_;
return *this;
}
DeviceQueueGlobalPriorityCreateInfoEXT& setGlobalPriority( QueueGlobalPriorityEXT globalPriority_ )
{
globalPriority = globalPriority_;
return *this;
}
operator const VkDeviceQueueGlobalPriorityCreateInfoEXT&() const
{
return *reinterpret_cast<const VkDeviceQueueGlobalPriorityCreateInfoEXT*>(this);
}
bool operator==( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext )
&& ( globalPriority == rhs.globalPriority );
}
bool operator!=( DeviceQueueGlobalPriorityCreateInfoEXT const& rhs ) const
{
return !operator==( rhs );
}
private:
StructureType sType;
public:
const void* pNext;
QueueGlobalPriorityEXT globalPriority;
};
static_assert( sizeof( DeviceQueueGlobalPriorityCreateInfoEXT ) == sizeof( VkDeviceQueueGlobalPriorityCreateInfoEXT ), "struct and wrapper have different size!" );
Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ); Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties );
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<LayerProperties>> template <typename Allocator = std::allocator<LayerProperties>>
typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Allocator const & alloc = Allocator() ); typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties();
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties )
@ -25586,9 +25732,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties(Allocator const & alloc ) VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateInstanceLayerProperties()
{ {
std::vector<LayerProperties,Allocator> properties( {alloc} ); std::vector<LayerProperties,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -25610,7 +25756,7 @@ namespace VULKAN_HPP_NAMESPACE
Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ); Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties );
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<ExtensionProperties>> template <typename Allocator = std::allocator<ExtensionProperties>>
typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr, Allocator const & alloc = Allocator() ); typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName = nullptr );
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties )
@ -25619,9 +25765,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName, Allocator const & alloc ) VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateInstanceExtensionProperties( Optional<const std::string> layerName )
{ {
std::vector<ExtensionProperties,Allocator> properties( {alloc} ); std::vector<ExtensionProperties,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -26856,7 +27002,7 @@ namespace VULKAN_HPP_NAMESPACE
void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const; void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SparseImageMemoryRequirements>> template <typename Allocator = std::allocator<SparseImageMemoryRequirements>>
std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image, Allocator const & alloc = Allocator() ) const; std::vector<SparseImageMemoryRequirements,Allocator> getImageSparseMemoryRequirements( Image image ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const;
@ -27029,7 +27175,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const; Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<uint8_t>> template <typename Allocator = std::allocator<uint8_t>>
typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<uint8_t,Allocator>>::type getPipelineCacheData( PipelineCache pipelineCache ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const; Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const;
@ -27040,11 +27186,11 @@ namespace VULKAN_HPP_NAMESPACE
Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<Pipeline>> template <typename Allocator = std::allocator<Pipeline>>
typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<Pipeline,Allocator>>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
ResultValueType<Pipeline>::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; ResultValueType<Pipeline>::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator = std::allocator<Pipeline>> template <typename Allocator = std::allocator<Pipeline>>
std::vector<UniquePipeline> createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; std::vector<UniquePipeline> createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -27052,11 +27198,11 @@ namespace VULKAN_HPP_NAMESPACE
Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<Pipeline>> template <typename Allocator = std::allocator<Pipeline>>
typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<Pipeline,Allocator>>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
ResultValueType<Pipeline>::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; ResultValueType<Pipeline>::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator = std::allocator<Pipeline>> template <typename Allocator = std::allocator<Pipeline>>
std::vector<UniquePipeline> createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; std::vector<UniquePipeline> createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -27127,10 +27273,10 @@ namespace VULKAN_HPP_NAMESPACE
Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const; Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<DescriptorSet>> template <typename Allocator = std::allocator<DescriptorSet>>
typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator = std::allocator<DescriptorSet>> template <typename Allocator = std::allocator<DescriptorSet>>
std::vector<UniqueDescriptorSet> allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; std::vector<UniqueDescriptorSet> allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -27197,10 +27343,10 @@ namespace VULKAN_HPP_NAMESPACE
Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const; Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<CommandBuffer>> template <typename Allocator = std::allocator<CommandBuffer>>
typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator = std::allocator<CommandBuffer>> template <typename Allocator = std::allocator<CommandBuffer>>
std::vector<UniqueCommandBuffer> allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc = Allocator() ) const; std::vector<UniqueCommandBuffer> allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -27212,11 +27358,11 @@ namespace VULKAN_HPP_NAMESPACE
Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const; Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SwapchainKHR>> template <typename Allocator = std::allocator<SwapchainKHR>>
typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; ResultValueType<SwapchainKHR>::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator = std::allocator<SwapchainKHR>> template <typename Allocator = std::allocator<SwapchainKHR>>
std::vector<UniqueSwapchainKHR> createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr, Allocator const & alloc = Allocator() ) const; std::vector<UniqueSwapchainKHR> createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator = nullptr ) const;
UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const; UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional<const AllocationCallbacks> allocator = nullptr ) const;
#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_NO_SMART_HANDLE*/
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -27237,7 +27383,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const; Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<Image>> template <typename Allocator = std::allocator<Image>>
typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<Image,Allocator>>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const; Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const;
@ -27456,7 +27602,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings ) const; Result getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, uint32_t* pPresentationTimingCount, PastPresentationTimingGOOGLE* pPresentationTimings ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<PastPresentationTimingGOOGLE>> template <typename Allocator = std::allocator<PastPresentationTimingGOOGLE>>
typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type getPastPresentationTimingGOOGLE( SwapchainKHR swapchain ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const; void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const;
@ -27476,7 +27622,7 @@ namespace VULKAN_HPP_NAMESPACE
void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const; void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SparseImageMemoryRequirements2KHR>> template <typename Allocator = std::allocator<SparseImageMemoryRequirements2KHR>>
std::vector<SparseImageMemoryRequirements2KHR,Allocator> getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Allocator const & alloc = Allocator() ) const; std::vector<SparseImageMemoryRequirements2KHR,Allocator> getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const; Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const;
@ -27508,7 +27654,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const; Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<uint8_t>> template <typename Allocator = std::allocator<uint8_t>>
typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<uint8_t,Allocator>>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const; Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const;
@ -27516,6 +27662,12 @@ namespace VULKAN_HPP_NAMESPACE
ResultValueType<void>::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy<const ValidationCacheEXT> srcCaches ) const; ResultValueType<void>::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy<const ValidationCacheEXT> srcCaches ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<uint8_t>>
typename ResultValueType<std::vector<uint8_t,Allocator>>::type getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const
@ -28219,9 +28371,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( Image image, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements,Allocator> Device::getImageSparseMemoryRequirements( Image image ) const
{ {
std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements( {alloc} ); std::vector<SparseImageMemoryRequirements,Allocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount; uint32_t sparseMemoryRequirementCount;
vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr ); vkGetImageSparseMemoryRequirements( m_device, static_cast<VkImage>( image ), &sparseMemoryRequirementCount, nullptr );
sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
@ -28648,9 +28800,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( PipelineCache pipelineCache, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getPipelineCacheData( PipelineCache pipelineCache ) const
{ {
std::vector<uint8_t,Allocator> data( {alloc} ); std::vector<uint8_t,Allocator> data;
size_t dataSize; size_t dataSize;
Result result; Result result;
do do
@ -28686,9 +28838,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
std::vector<Pipeline,Allocator> pipelines( createInfos.size(), {}, {alloc} ); std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelines" ); return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelines" );
} }
@ -28700,10 +28852,10 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
PipelineDeleter deleter( *this, allocator ); PipelineDeleter deleter( *this, allocator );
std::vector<Pipeline,Allocator> pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator, alloc ); std::vector<Pipeline,Allocator> pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator );
std::vector<UniquePipeline> uniquePipelines; std::vector<UniquePipeline> uniquePipelines;
uniquePipelines.reserve( pipelines.size() ); uniquePipelines.reserve( pipelines.size() );
for ( auto pipeline : pipelines ) for ( auto pipeline : pipelines )
@ -28726,9 +28878,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<Pipeline,Allocator>>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
std::vector<Pipeline,Allocator> pipelines( createInfos.size(), {}, {alloc} ); std::vector<Pipeline,Allocator> pipelines( createInfos.size() );
Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) ); Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelines" ); return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelines" );
} }
@ -28740,10 +28892,10 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<UniquePipeline> Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
PipelineDeleter deleter( *this, allocator ); PipelineDeleter deleter( *this, allocator );
std::vector<Pipeline,Allocator> pipelines = createComputePipelines( pipelineCache, createInfos, allocator, alloc ); std::vector<Pipeline,Allocator> pipelines = createComputePipelines( pipelineCache, createInfos, allocator );
std::vector<UniquePipeline> uniquePipelines; std::vector<UniquePipeline> uniquePipelines;
uniquePipelines.reserve( pipelines.size() ); uniquePipelines.reserve( pipelines.size() );
for ( auto pipeline : pipelines ) for ( auto pipeline : pipelines )
@ -28914,18 +29066,18 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<DescriptorSet,Allocator>>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const
{ {
std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount, {}, {alloc} ); std::vector<DescriptorSet,Allocator> descriptorSets( allocateInfo.descriptorSetCount );
Result result = static_cast<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) ); Result result = static_cast<Result>( vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( descriptorSets.data() ) ) );
return createResultValue( result, descriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSets" ); return createResultValue( result, descriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSets" );
} }
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<UniqueDescriptorSet> Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<UniqueDescriptorSet> Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const
{ {
DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool );
std::vector<DescriptorSet,Allocator> descriptorSets = allocateDescriptorSets( allocateInfo, alloc ); std::vector<DescriptorSet,Allocator> descriptorSets = allocateDescriptorSets( allocateInfo );
std::vector<UniqueDescriptorSet> uniqueDescriptorSets; std::vector<UniqueDescriptorSet> uniqueDescriptorSets;
uniqueDescriptorSets.reserve( descriptorSets.size() ); uniqueDescriptorSets.reserve( descriptorSets.size() );
for ( auto descriptorSet : descriptorSets ) for ( auto descriptorSet : descriptorSets )
@ -29085,18 +29237,18 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<CommandBuffer,Allocator>>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const
{ {
std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount, {}, {alloc} ); std::vector<CommandBuffer,Allocator> commandBuffers( allocateInfo.commandBufferCount );
Result result = static_cast<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) ); Result result = static_cast<Result>( vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( commandBuffers.data() ) ) );
return createResultValue( result, commandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffers" ); return createResultValue( result, commandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffers" );
} }
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<UniqueCommandBuffer> Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<UniqueCommandBuffer> Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const
{ {
CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); CommandBufferDeleter deleter( *this, allocateInfo.commandPool );
std::vector<CommandBuffer,Allocator> commandBuffers = allocateCommandBuffers( allocateInfo, alloc ); std::vector<CommandBuffer,Allocator> commandBuffers = allocateCommandBuffers( allocateInfo );
std::vector<UniqueCommandBuffer> uniqueCommandBuffers; std::vector<UniqueCommandBuffer> uniqueCommandBuffers;
uniqueCommandBuffers.reserve( commandBuffers.size() ); uniqueCommandBuffers.reserve( commandBuffers.size() );
for ( auto commandBuffer : commandBuffers ) for ( auto commandBuffer : commandBuffers )
@ -29125,9 +29277,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<SwapchainKHR,Allocator>>::type Device::createSharedSwapchainsKHR( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size(), {}, {alloc} ); std::vector<SwapchainKHR,Allocator> swapchains( createInfos.size() );
Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) ); Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
return createResultValue( result, swapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHR" ); return createResultValue( result, swapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHR" );
} }
@ -29139,10 +29291,10 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<UniqueSwapchainKHR> Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<UniqueSwapchainKHR> Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator ) const
{ {
SwapchainKHRDeleter deleter( *this, allocator ); SwapchainKHRDeleter deleter( *this, allocator );
std::vector<SwapchainKHR,Allocator> swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator, alloc ); std::vector<SwapchainKHR,Allocator> swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator );
std::vector<UniqueSwapchainKHR> uniqueSwapchainKHRs; std::vector<UniqueSwapchainKHR> uniqueSwapchainKHRs;
uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); uniqueSwapchainKHRs.reserve( swapchainKHRs.size() );
for ( auto swapchainKHR : swapchainKHRs ) for ( auto swapchainKHR : swapchainKHRs )
@ -29196,9 +29348,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<Image,Allocator>>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain ) const
{ {
std::vector<Image,Allocator> swapchainImages( {alloc} ); std::vector<Image,Allocator> swapchainImages;
uint32_t swapchainImageCount; uint32_t swapchainImageCount;
Result result; Result result;
do do
@ -29753,9 +29905,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<PastPresentationTimingGOOGLE,Allocator>>::type Device::getPastPresentationTimingGOOGLE( SwapchainKHR swapchain ) const
{ {
std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings( {alloc} ); std::vector<PastPresentationTimingGOOGLE,Allocator> presentationTimings;
uint32_t presentationTimingCount; uint32_t presentationTimingCount;
Result result = static_cast<Result>( vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, nullptr ) ); Result result = static_cast<Result>( vkGetPastPresentationTimingGOOGLE( m_device, static_cast<VkSwapchainKHR>( swapchain ), &presentationTimingCount, nullptr ) );
if ( ( result == Result::eSuccess ) && presentationTimingCount ) if ( ( result == Result::eSuccess ) && presentationTimingCount )
@ -29815,9 +29967,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2KHR,Allocator> Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<SparseImageMemoryRequirements2KHR,Allocator> Device::getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info ) const
{ {
std::vector<SparseImageMemoryRequirements2KHR,Allocator> sparseMemoryRequirements( {alloc} ); std::vector<SparseImageMemoryRequirements2KHR,Allocator> sparseMemoryRequirements;
uint32_t sparseMemoryRequirementCount; uint32_t sparseMemoryRequirementCount;
vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2KHR*>( &info ), &sparseMemoryRequirementCount, nullptr ); vkGetImageSparseMemoryRequirements2KHR( m_device, reinterpret_cast<const VkImageSparseMemoryRequirementsInfo2KHR*>( &info ), &sparseMemoryRequirementCount, nullptr );
sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); sparseMemoryRequirements.resize( sparseMemoryRequirementCount );
@ -29894,9 +30046,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache ) const
{ {
std::vector<uint8_t,Allocator> data( {alloc} ); std::vector<uint8_t,Allocator> data;
size_t dataSize; size_t dataSize;
Result result; Result result;
do do
@ -29926,6 +30078,32 @@ namespace VULKAN_HPP_NAMESPACE
} }
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const
{
return static_cast<Result>( vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), pInfoSize, pInfo ) );
}
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t,Allocator>>::type Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType ) const
{
std::vector<uint8_t,Allocator> info;
size_t infoSize;
Result result;
do
{
result = static_cast<Result>( vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, nullptr ) );
if ( ( result == Result::eSuccess ) && infoSize )
{
info.resize( infoSize );
result = static_cast<Result>( vkGetShaderInfoAMD( m_device, static_cast<VkPipeline>( pipeline ), static_cast<VkShaderStageFlagBits>( shaderStage ), static_cast<VkShaderInfoTypeAMD>( infoType ), &infoSize, reinterpret_cast<void*>( info.data() ) ) );
}
} while ( result == Result::eIncomplete );
assert( infoSize <= info.size() );
info.resize( infoSize );
return createResultValue( result, info, "VULKAN_HPP_NAMESPACE::Device::getShaderInfoAMD" );
}
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifndef VULKAN_HPP_NO_SMART_HANDLE #ifndef VULKAN_HPP_NO_SMART_HANDLE
class DeviceDeleter; class DeviceDeleter;
using UniqueDevice = UniqueHandle<Device, DeviceDeleter>; using UniqueDevice = UniqueHandle<Device, DeviceDeleter>;
@ -29983,7 +30161,7 @@ namespace VULKAN_HPP_NAMESPACE
void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const; void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties>> template <typename Allocator = std::allocator<QueueFamilyProperties>>
std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties(Allocator const & alloc = Allocator() ) const; std::vector<QueueFamilyProperties,Allocator> getQueueFamilyProperties() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const; void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const;
@ -30017,43 +30195,43 @@ namespace VULKAN_HPP_NAMESPACE
Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const; Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<LayerProperties>> template <typename Allocator = std::allocator<LayerProperties>>
typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties(Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<LayerProperties,Allocator>>::type enumerateDeviceLayerProperties() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const; Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<ExtensionProperties>> template <typename Allocator = std::allocator<ExtensionProperties>>
typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName = nullptr, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type enumerateDeviceExtensionProperties( Optional<const std::string> layerName = nullptr ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const; void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SparseImageFormatProperties>> template <typename Allocator = std::allocator<SparseImageFormatProperties>>
std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const & alloc = Allocator() ) const; std::vector<SparseImageFormatProperties,Allocator> getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const; Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<DisplayPropertiesKHR>> template <typename Allocator = std::allocator<DisplayPropertiesKHR>>
typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR(Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type getDisplayPropertiesKHR() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const; Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>> template <typename Allocator = std::allocator<DisplayPlanePropertiesKHR>>
typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR(Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type getDisplayPlanePropertiesKHR() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const; Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<DisplayKHR>> template <typename Allocator = std::allocator<DisplayKHR>>
typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const; Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<DisplayModePropertiesKHR>> template <typename Allocator = std::allocator<DisplayModePropertiesKHR>>
typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type getDisplayModePropertiesKHR( DisplayKHR display ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const; Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const;
@ -30086,13 +30264,13 @@ namespace VULKAN_HPP_NAMESPACE
Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const; Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SurfaceFormatKHR>> template <typename Allocator = std::allocator<SurfaceFormatKHR>>
typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const; Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<PresentModeKHR>> template <typename Allocator = std::allocator<PresentModeKHR>>
typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_WAYLAND_KHR #ifdef VK_USE_PLATFORM_WAYLAND_KHR
@ -30159,7 +30337,7 @@ namespace VULKAN_HPP_NAMESPACE
void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const; void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<QueueFamilyProperties2KHR>> template <typename Allocator = std::allocator<QueueFamilyProperties2KHR>>
std::vector<QueueFamilyProperties2KHR,Allocator> getQueueFamilyProperties2KHR(Allocator const & alloc = Allocator() ) const; std::vector<QueueFamilyProperties2KHR,Allocator> getQueueFamilyProperties2KHR() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const; void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const;
@ -30170,7 +30348,7 @@ namespace VULKAN_HPP_NAMESPACE
void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const; void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SparseImageFormatProperties2KHR>> template <typename Allocator = std::allocator<SparseImageFormatProperties2KHR>>
std::vector<SparseImageFormatProperties2KHR,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Allocator const & alloc = Allocator() ) const; std::vector<SparseImageFormatProperties2KHR,Allocator> getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties ) const; void getExternalBufferPropertiesKHR( const PhysicalDeviceExternalBufferInfoKHR* pExternalBufferInfo, ExternalBufferPropertiesKHR* pExternalBufferProperties ) const;
@ -30216,7 +30394,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects ) const; Result getPresentRectanglesKHX( SurfaceKHR surface, uint32_t* pRectCount, Rect2D* pRects ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<Rect2D>> template <typename Allocator = std::allocator<Rect2D>>
typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHX( SurfaceKHR surface, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<Rect2D,Allocator>>::type getPresentRectanglesKHX( SurfaceKHR surface ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const; void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const;
@ -30234,7 +30412,7 @@ namespace VULKAN_HPP_NAMESPACE
Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats ) const; Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<SurfaceFormat2KHR>> template <typename Allocator = std::allocator<SurfaceFormat2KHR>>
typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
@ -30297,9 +30475,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties,Allocator> PhysicalDevice::getQueueFamilyProperties(Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<QueueFamilyProperties,Allocator> PhysicalDevice::getQueueFamilyProperties() const
{ {
std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties( {alloc} ); std::vector<QueueFamilyProperties,Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount; uint32_t queueFamilyPropertyCount;
vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
@ -30386,9 +30564,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type PhysicalDevice::enumerateDeviceLayerProperties(Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<LayerProperties,Allocator>>::type PhysicalDevice::enumerateDeviceLayerProperties() const
{ {
std::vector<LayerProperties,Allocator> properties( {alloc} ); std::vector<LayerProperties,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -30412,9 +30590,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<ExtensionProperties,Allocator>>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional<const std::string> layerName ) const
{ {
std::vector<ExtensionProperties,Allocator> properties( {alloc} ); std::vector<ExtensionProperties,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -30438,9 +30616,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties,Allocator> PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const
{ {
std::vector<SparseImageFormatProperties,Allocator> properties( {alloc} ); std::vector<SparseImageFormatProperties,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr ); vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast<VkFormat>( format ), static_cast<VkImageType>( type ), static_cast<VkSampleCountFlagBits>( samples ), static_cast<VkImageUsageFlags>( usage ), static_cast<VkImageTiling>( tiling ), &propertyCount, nullptr );
properties.resize( propertyCount ); properties.resize( propertyCount );
@ -30455,9 +30633,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPropertiesKHR(Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPropertiesKHR() const
{ {
std::vector<DisplayPropertiesKHR,Allocator> properties( {alloc} ); std::vector<DisplayPropertiesKHR,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -30481,9 +30659,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPlanePropertiesKHR(Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayPlanePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayPlanePropertiesKHR() const
{ {
std::vector<DisplayPlanePropertiesKHR,Allocator> properties( {alloc} ); std::vector<DisplayPlanePropertiesKHR,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -30507,9 +30685,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayKHR,Allocator>>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const
{ {
std::vector<DisplayKHR,Allocator> displays( {alloc} ); std::vector<DisplayKHR,Allocator> displays;
uint32_t displayCount; uint32_t displayCount;
Result result; Result result;
do do
@ -30533,9 +30711,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<DisplayModePropertiesKHR,Allocator>>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display ) const
{ {
std::vector<DisplayModePropertiesKHR,Allocator> properties( {alloc} ); std::vector<DisplayModePropertiesKHR,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
Result result; Result result;
do do
@ -30624,9 +30802,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormatKHR,Allocator>>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface ) const
{ {
std::vector<SurfaceFormatKHR,Allocator> surfaceFormats( {alloc} ); std::vector<SurfaceFormatKHR,Allocator> surfaceFormats;
uint32_t surfaceFormatCount; uint32_t surfaceFormatCount;
Result result; Result result;
do do
@ -30650,9 +30828,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<PresentModeKHR,Allocator>>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface ) const
{ {
std::vector<PresentModeKHR,Allocator> presentModes( {alloc} ); std::vector<PresentModeKHR,Allocator> presentModes;
uint32_t presentModeCount; uint32_t presentModeCount;
Result result; Result result;
do do
@ -30824,9 +31002,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2KHR,Allocator> PhysicalDevice::getQueueFamilyProperties2KHR(Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<QueueFamilyProperties2KHR,Allocator> PhysicalDevice::getQueueFamilyProperties2KHR() const
{ {
std::vector<QueueFamilyProperties2KHR,Allocator> queueFamilyProperties( {alloc} ); std::vector<QueueFamilyProperties2KHR,Allocator> queueFamilyProperties;
uint32_t queueFamilyPropertyCount; uint32_t queueFamilyPropertyCount;
vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr );
queueFamilyProperties.resize( queueFamilyPropertyCount ); queueFamilyProperties.resize( queueFamilyPropertyCount );
@ -30854,9 +31032,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2KHR,Allocator> PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE std::vector<SparseImageFormatProperties2KHR,Allocator> PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const
{ {
std::vector<SparseImageFormatProperties2KHR,Allocator> properties( {alloc} ); std::vector<SparseImageFormatProperties2KHR,Allocator> properties;
uint32_t propertyCount; uint32_t propertyCount;
vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, nullptr ); vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast<const VkPhysicalDeviceSparseImageFormatInfo2KHR*>( &formatInfo ), &propertyCount, nullptr );
properties.resize( propertyCount ); properties.resize( propertyCount );
@ -30966,9 +31144,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<Rect2D,Allocator>>::type PhysicalDevice::getPresentRectanglesKHX( SurfaceKHR surface ) const
{ {
std::vector<Rect2D,Allocator> rects( {alloc} ); std::vector<Rect2D,Allocator> rects;
uint32_t rectCount; uint32_t rectCount;
Result result; Result result;
do do
@ -31026,9 +31204,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo, Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<SurfaceFormat2KHR,Allocator>>::type PhysicalDevice::getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const
{ {
std::vector<SurfaceFormat2KHR,Allocator> surfaceFormats( {alloc} ); std::vector<SurfaceFormat2KHR,Allocator> surfaceFormats;
uint32_t surfaceFormatCount; uint32_t surfaceFormatCount;
Result result; Result result;
do do
@ -31275,7 +31453,7 @@ namespace VULKAN_HPP_NAMESPACE
Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const; Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<PhysicalDevice>> template <typename Allocator = std::allocator<PhysicalDevice>>
typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices(Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type enumeratePhysicalDevices() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
PFN_vkVoidFunction getProcAddr( const char* pName ) const; PFN_vkVoidFunction getProcAddr( const char* pName ) const;
@ -31387,7 +31565,7 @@ namespace VULKAN_HPP_NAMESPACE
Result enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties ) const; Result enumeratePhysicalDeviceGroupsKHX( uint32_t* pPhysicalDeviceGroupCount, PhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties ) const;
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator = std::allocator<PhysicalDeviceGroupPropertiesKHX>> template <typename Allocator = std::allocator<PhysicalDeviceGroupPropertiesKHX>>
typename ResultValueType<std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator>>::type enumeratePhysicalDeviceGroupsKHX(Allocator const & alloc = Allocator() ) const; typename ResultValueType<std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator>>::type enumeratePhysicalDeviceGroupsKHX() const;
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
#ifdef VK_USE_PLATFORM_IOS_MVK #ifdef VK_USE_PLATFORM_IOS_MVK
@ -31488,9 +31666,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type Instance::enumeratePhysicalDevices(Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDevice,Allocator>>::type Instance::enumeratePhysicalDevices() const
{ {
std::vector<PhysicalDevice,Allocator> physicalDevices( {alloc} ); std::vector<PhysicalDevice,Allocator> physicalDevices;
uint32_t physicalDeviceCount; uint32_t physicalDeviceCount;
Result result; Result result;
do do
@ -31760,9 +31938,9 @@ namespace VULKAN_HPP_NAMESPACE
} }
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
template <typename Allocator> template <typename Allocator>
VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator>>::type Instance::enumeratePhysicalDeviceGroupsKHX(Allocator const & alloc ) const VULKAN_HPP_INLINE typename ResultValueType<std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator>>::type Instance::enumeratePhysicalDeviceGroupsKHX() const
{ {
std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator> physicalDeviceGroupProperties( {alloc} ); std::vector<PhysicalDeviceGroupPropertiesKHX,Allocator> physicalDeviceGroupProperties;
uint32_t physicalDeviceGroupCount; uint32_t physicalDeviceGroupCount;
Result result; Result result;
do do
@ -32044,6 +32222,7 @@ namespace VULKAN_HPP_NAMESPACE
template <> constexpr bool isStructureChainValid<PipelineTessellationStateCreateInfo, PipelineTessellationDomainOriginStateCreateInfoKHR>() { return true; } template <> constexpr bool isStructureChainValid<PipelineTessellationStateCreateInfo, PipelineTessellationDomainOriginStateCreateInfoKHR>() { return true; }
template <> constexpr bool isStructureChainValid<PipelineColorBlendStateCreateInfo, PipelineColorBlendAdvancedStateCreateInfoEXT>() { return true; } template <> constexpr bool isStructureChainValid<PipelineColorBlendStateCreateInfo, PipelineColorBlendAdvancedStateCreateInfoEXT>() { return true; }
template <> constexpr bool isStructureChainValid<PipelineMultisampleStateCreateInfo, PipelineCoverageModulationStateCreateInfoNV>() { return true; } template <> constexpr bool isStructureChainValid<PipelineMultisampleStateCreateInfo, PipelineCoverageModulationStateCreateInfoNV>() { return true; }
template <> constexpr bool isStructureChainValid<DeviceQueueCreateInfo, DeviceQueueGlobalPriorityCreateInfoEXT>() { return true; }
template <> constexpr bool isStructureChainValid<DeviceCreateInfo, DeviceGroupDeviceCreateInfoKHX>() { return true; } template <> constexpr bool isStructureChainValid<DeviceCreateInfo, DeviceGroupDeviceCreateInfoKHX>() { return true; }
VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits) VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits)
{ {
@ -33430,6 +33609,7 @@ namespace VULKAN_HPP_NAMESPACE
case StructureType::eBindImageMemoryInfoKHR: return "BindImageMemoryInfoKHR"; case StructureType::eBindImageMemoryInfoKHR: return "BindImageMemoryInfoKHR";
case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT"; case StructureType::eValidationCacheCreateInfoEXT: return "ValidationCacheCreateInfoEXT";
case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT"; case StructureType::eShaderModuleValidationCacheCreateInfoEXT: return "ShaderModuleValidationCacheCreateInfoEXT";
case StructureType::eDeviceQueueGlobalPriorityCreateInfoEXT: return "DeviceQueueGlobalPriorityCreateInfoEXT";
default: return "invalid"; default: return "invalid";
} }
} }
@ -35071,6 +35251,29 @@ namespace VULKAN_HPP_NAMESPACE
} }
} }
VULKAN_HPP_INLINE std::string to_string(ShaderInfoTypeAMD value)
{
switch (value)
{
case ShaderInfoTypeAMD::eStatistics: return "Statistics";
case ShaderInfoTypeAMD::eBinary: return "Binary";
case ShaderInfoTypeAMD::eDisassembly: return "Disassembly";
default: return "invalid";
}
}
VULKAN_HPP_INLINE std::string to_string(QueueGlobalPriorityEXT value)
{
switch (value)
{
case QueueGlobalPriorityEXT::eLow: return "Low";
case QueueGlobalPriorityEXT::eMedium: return "Medium";
case QueueGlobalPriorityEXT::eHigh: return "High";
case QueueGlobalPriorityEXT::eRealtime: return "Realtime";
default: return "invalid";
}
}
} // namespace VULKAN_HPP_NAMESPACE } // namespace VULKAN_HPP_NAMESPACE
#endif #endif