mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Add support for template strings in code generator to make the code generator more readable. (#103)
Update to Vulkan 1.0.48
This commit is contained in:
parent
cd9d4f1388
commit
850e77938f
@ -1 +1 @@
|
|||||||
Subproject commit f985a50c1f0b6f37c706db32d70da85bc1e2d78f
|
Subproject commit 757a1232e6541db17585d1f59a17dfdaa272c100
|
@ -25,6 +25,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <regex>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
#include <tinyxml2.h>
|
#include <tinyxml2.h>
|
||||||
|
|
||||||
@ -600,6 +602,38 @@ const std::string uniqueHandleHeader = R"(
|
|||||||
|
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
std::string replaceWithMap(std::string const &input, std::map<std::string, std::string> replacements)
|
||||||
|
{
|
||||||
|
// This will match ${someVariable} and contain someVariable in match group 1
|
||||||
|
std::regex re(R"(\$\{([^\}]+)\})");
|
||||||
|
auto it = std::sregex_iterator(input.begin(), input.end(), re);
|
||||||
|
auto end = std::sregex_iterator();
|
||||||
|
|
||||||
|
// No match, just return the original string
|
||||||
|
if (it == end)
|
||||||
|
{
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string result = "";
|
||||||
|
while (it != end)
|
||||||
|
{
|
||||||
|
std::smatch match = *it;
|
||||||
|
auto itReplacement = replacements.find(match[1].str());
|
||||||
|
assert(itReplacement != replacements.end());
|
||||||
|
|
||||||
|
result += match.prefix().str() + ((itReplacement != replacements.end()) ? itReplacement->second : match[0].str());
|
||||||
|
++it;
|
||||||
|
|
||||||
|
// we've passed the last match. Append the rest of the orignal string
|
||||||
|
if (it == end)
|
||||||
|
{
|
||||||
|
result += match.suffix().str();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
struct ParamData
|
struct ParamData
|
||||||
{
|
{
|
||||||
std::string type;
|
std::string type;
|
||||||
@ -797,6 +831,7 @@ std::string toCamelCase(std::string const& value);
|
|||||||
std::string toUpperCase(std::string const& name);
|
std::string toUpperCase(std::string const& name);
|
||||||
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);
|
||||||
void writeCallCountParameter(std::ostream & os, CommandData const& commandData, bool singular, std::map<size_t, size_t>::const_iterator it);
|
void writeCallCountParameter(std::ostream & os, CommandData const& commandData, bool singular, std::map<size_t, size_t>::const_iterator it);
|
||||||
void writeCallParameter(std::ostream & os, ParamData const& paramData, std::set<std::string> const& vkTypes);
|
void writeCallParameter(std::ostream & os, ParamData const& paramData, std::set<std::string> const& vkTypes);
|
||||||
void writeCallPlainTypeParameter(std::ostream & os, ParamData const& paramData);
|
void writeCallPlainTypeParameter(std::ostream & os, ParamData const& paramData);
|
||||||
@ -1636,31 +1671,31 @@ void readExtensionType(tinyxml2::XMLElement * element, VkData & vkData, std::str
|
|||||||
|
|
||||||
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 = trimEnd(element->Value());
|
||||||
assert((value == "const") || (value == "struct"));
|
assert((value == "const") || (value == "struct"));
|
||||||
type = value + " ";
|
type = value + " ";
|
||||||
element = element->NextSibling();
|
element = element->NextSibling();
|
||||||
assert(element);
|
assert(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(element->ToElement());
|
assert(element->ToElement());
|
||||||
assert((strcmp(element->Value(), "type") == 0) && element->ToElement() && element->ToElement()->GetText());
|
assert((strcmp(element->Value(), "type") == 0) && element->ToElement() && element->ToElement()->GetText());
|
||||||
pureType = strip(element->ToElement()->GetText(), "Vk");
|
pureType = strip(element->ToElement()->GetText(), "Vk");
|
||||||
type += pureType;
|
type += pureType;
|
||||||
|
|
||||||
element = element->NextSibling();
|
element = element->NextSibling();
|
||||||
assert(element);
|
assert(element);
|
||||||
if (element->ToText())
|
if (element->ToText())
|
||||||
{
|
{
|
||||||
std::string value = trimEnd(element->Value());
|
std::string value = trimEnd(element->Value());
|
||||||
assert((value == "*") || (value == "**") || (value == "* const*"));
|
assert((value == "*") || (value == "**") || (value == "* const*"));
|
||||||
type += value;
|
type += value;
|
||||||
element = element->NextSibling();
|
element = element->NextSibling();
|
||||||
}
|
}
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
void readTypeBasetype( tinyxml2::XMLElement * element, std::list<DependencyData> & dependencies )
|
void readTypeBasetype( tinyxml2::XMLElement * element, std::list<DependencyData> & dependencies )
|
||||||
@ -2065,6 +2100,13 @@ std::string trimEnd(std::string const& input)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string generateCall(CommandData const& commandData, std::set<std::string> const& vkTypes, bool firstCall, bool singular)
|
||||||
|
{
|
||||||
|
std::ostringstream call;
|
||||||
|
writeCall(call, commandData, vkTypes, firstCall, singular);
|
||||||
|
return call.str();
|
||||||
|
}
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
// get the parameter indices of the counter for vector parameters
|
// get the parameter indices of the counter for vector parameters
|
||||||
@ -2374,76 +2416,81 @@ void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void writeFunctionBodyEnhanced(std::ostream &os, std::string const& templateString, std::string const& indentation, std::set<std::string> const& vkTypes, CommandData const& commandData, bool singular)
|
||||||
|
{
|
||||||
|
os << replaceWithMap(templateString, {
|
||||||
|
{ "call", generateCall(commandData, vkTypes, true, singular) },
|
||||||
|
{ "i", indentation }
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedCall(std::ostream &os, std::string const& indentation, std::set<std::string> const& vkTypes, CommandData const& commandData, bool singular)
|
void writeFunctionBodyEnhancedCall(std::ostream &os, std::string const& indentation, std::set<std::string> const& vkTypes, CommandData const& commandData, bool singular)
|
||||||
{
|
{
|
||||||
os << indentation << " ";
|
std::string const templateString = "${i} return ${call};\n";
|
||||||
|
std::string const templateStringVoid = "${i} ${call};\n";
|
||||||
if (commandData.returnType != "void")
|
writeFunctionBodyEnhanced(os, commandData.returnType == "void" ? templateStringVoid : templateString, indentation, vkTypes, commandData, singular);
|
||||||
{
|
|
||||||
os << "return ";
|
|
||||||
}
|
|
||||||
writeCall(os, commandData, vkTypes, true, singular);
|
|
||||||
os << ";" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedCallResult(std::ostream &os, std::string const& indentation, std::set<std::string> const& vkTypes, CommandData const& commandData, bool singular)
|
void writeFunctionBodyEnhancedCallResult(std::ostream &os, std::string const& indentation, std::set<std::string> const& vkTypes, CommandData const& commandData, bool singular)
|
||||||
{
|
{
|
||||||
os << indentation << " Result result = static_cast<Result>( ";
|
std::string const templateString = "${i} Result result = static_cast<Result>( ${call} );\n";
|
||||||
writeCall(os, commandData, vkTypes, true, singular);
|
writeFunctionBodyEnhanced(os, templateString, indentation, vkTypes, commandData, singular);
|
||||||
os << " );" << std::endl;
|
}
|
||||||
|
|
||||||
|
void writeFunctionBodyTwoStep(std::ostream & os, std::string const &templateString, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
||||||
|
{
|
||||||
|
std::map<std::string, std::string> replacements = {
|
||||||
|
{ "sizeName", sizeName },
|
||||||
|
{ "returnName", returnName },
|
||||||
|
{ "call1", generateCall(commandData, vkTypes, true, false) },
|
||||||
|
{ "call2", generateCall(commandData, vkTypes, false, false) },
|
||||||
|
{ "i", indentation }
|
||||||
|
};
|
||||||
|
|
||||||
|
os << replaceWithMap(templateString, replacements);
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedCallTwoStep(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
void writeFunctionBodyEnhancedCallTwoStep(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
||||||
{
|
{
|
||||||
os << indentation << " ";
|
std::string const templateString =
|
||||||
writeCall(os, commandData, vkTypes, true, false);
|
R"(${i} ${call1};
|
||||||
os << ";" << std::endl;
|
${i} ${returnName}.resize( ${sizeName} );
|
||||||
|
${i} ${call2};
|
||||||
// resize the vector to hold the data according to the result from the first call
|
)";
|
||||||
os << indentation << " " << returnName << ".resize( " << sizeName << " );" << std::endl
|
writeFunctionBodyTwoStep(os, templateString, indentation, vkTypes, returnName, sizeName, commandData);
|
||||||
<< indentation << " ";
|
|
||||||
writeCall(os, commandData, vkTypes, false, false);
|
|
||||||
os << ";" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedCallTwoStepChecked(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
void writeFunctionBodyEnhancedCallTwoStepChecked(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
||||||
{
|
{
|
||||||
os << indentation << " Result result = static_cast<Result>( ";
|
std::string const templateString =
|
||||||
writeCall(os, commandData, vkTypes, true, false);
|
R"(${i} Result result = static_cast<Result>( ${call1} );
|
||||||
os << " );" << std::endl
|
${i} if ( ( result == Result::eSuccess ) && ${sizeName} )
|
||||||
<< indentation << " if ( ( result == Result::eSuccess ) && " << sizeName << " )" << std::endl
|
${i} {
|
||||||
<< indentation << " {" << std::endl
|
${i} ${returnName}.resize( ${sizeName} );
|
||||||
<< indentation << " " << returnName << ".resize( " << sizeName << " );" << std::endl
|
${i} result = static_cast<Result>( ${call2} );
|
||||||
<< indentation << " result = static_cast<Result>( ";
|
${i} }
|
||||||
writeCall(os, commandData, vkTypes, false, false);
|
)";
|
||||||
os << " );" << std::endl
|
writeFunctionBodyTwoStep(os, templateString, indentation, vkTypes, returnName, sizeName, commandData);
|
||||||
<< indentation << " }" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedCallTwoStepIterate(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
void writeFunctionBodyEnhancedCallTwoStepIterate(std::ostream & os, std::string const& indentation, std::set<std::string> const& vkTypes, std::string const& returnName, std::string const& sizeName, CommandData const& commandData)
|
||||||
{
|
{
|
||||||
// we need a local variable of type 'Result' to get the results of the calls
|
std::string const templateString =
|
||||||
os << indentation << " Result result;" << std::endl
|
R"(${i} Result result;
|
||||||
<< indentation << " do" << std::endl
|
${i} do
|
||||||
<< indentation << " {" << std::endl
|
${i} {
|
||||||
<< indentation << " result = static_cast<Result>( ";
|
${i} result = static_cast<Result>( ${call1} );
|
||||||
writeCall(os, commandData, vkTypes, true, false);
|
${i} if ( ( result == Result::eSuccess ) && ${sizeName} )
|
||||||
os << " );" << std::endl;
|
${i} {
|
||||||
|
${i} ${returnName}.resize( ${sizeName} );
|
||||||
// check if the result was success and the size != 0
|
${i} result = static_cast<Result>( ${call2} );
|
||||||
os << indentation << " if ( ( result == Result::eSuccess ) && " << sizeName << " )" << std::endl
|
${i} }
|
||||||
<< indentation << " {" << std::endl
|
${i} } while ( result == Result::eIncomplete );
|
||||||
// resize the vector to hold the data according to the result from the first call
|
${i} assert( ${sizeName} <= ${returnName}.size() );
|
||||||
<< indentation << " " << returnName << ".resize( " << sizeName << " );" << std::endl
|
${i} ${returnName}.resize( ${sizeName} );
|
||||||
// we need a static cast again
|
)";
|
||||||
<< indentation << " result = static_cast<Result>( ";
|
writeFunctionBodyTwoStep(os, templateString, indentation, vkTypes, returnName, sizeName, commandData);
|
||||||
writeCall(os, commandData, vkTypes, false, false);
|
|
||||||
os << " );" << std::endl
|
|
||||||
<< indentation << " }" << std::endl
|
|
||||||
// close the loop until we got complete data
|
|
||||||
<< indentation << " } while ( result == Result::eIncomplete );" << std::endl
|
|
||||||
<< indentation << " assert( " << sizeName << " <= " << returnName << ".size() ); " << std::endl
|
|
||||||
<< indentation << " " << returnName << ".resize( " << sizeName << " ); " << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBodyEnhancedLocalCountVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData)
|
void writeFunctionBodyEnhancedLocalCountVariable(std::ostream & os, std::string const& indentation, CommandData const& commandData)
|
||||||
@ -2526,6 +2573,18 @@ std::string writeFunctionBodyEnhancedLocalReturnVariable(std::ostream & os, std:
|
|||||||
|
|
||||||
void writeFunctionBodyEnhancedMultiVectorSizeCheck(std::ostream & os, std::string const& indentation, CommandData const& commandData)
|
void writeFunctionBodyEnhancedMultiVectorSizeCheck(std::ostream & os, std::string const& indentation, CommandData const& commandData)
|
||||||
{
|
{
|
||||||
|
std::string const templateString =
|
||||||
|
R"#(#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
||||||
|
${i} assert( ${firstVectorName}.size() == ${secondVectorName}.size() );
|
||||||
|
#else
|
||||||
|
${i} if ( ${firstVectorName}.size() != ${secondVectorName}.size() )
|
||||||
|
${i} {
|
||||||
|
${i} throw LogicError( "vk::${className}::${reducedName}: ${firstVectorName}.size() != ${secondVectorName}.size()" );
|
||||||
|
${i} }
|
||||||
|
#endif // VULKAN_HPP_NO_EXCEPTIONS
|
||||||
|
)#";
|
||||||
|
|
||||||
|
|
||||||
// add some error checks if multiple vectors need to have the same size
|
// add some error checks if multiple vectors need to have the same size
|
||||||
for (std::map<size_t, size_t>::const_iterator it0 = commandData.vectorParams.begin(); it0 != commandData.vectorParams.end(); ++it0)
|
for (std::map<size_t, size_t>::const_iterator it0 = commandData.vectorParams.begin(); it0 != commandData.vectorParams.end(); ++it0)
|
||||||
{
|
{
|
||||||
@ -2535,16 +2594,13 @@ void writeFunctionBodyEnhancedMultiVectorSizeCheck(std::ostream & os, std::strin
|
|||||||
{
|
{
|
||||||
if ((it1->first != commandData.returnParam) && (it0->second == it1->second))
|
if ((it1->first != commandData.returnParam) && (it0->second == it1->second))
|
||||||
{
|
{
|
||||||
std::string firstVectorName = startLowerCase(strip(commandData.params[it0->first].name, "p"));
|
os << replaceWithMap(templateString, std::map<std::string, std::string>( {
|
||||||
std::string secondVectorName = startLowerCase(strip(commandData.params[it1->first].name, "p"));
|
{ "firstVectorName", startLowerCase(strip(commandData.params[it0->first].name, "p")) },
|
||||||
os << "#ifdef VULKAN_HPP_NO_EXCEPTIONS" << std::endl
|
{ "secondVectorName", startLowerCase(strip(commandData.params[it1->first].name, "p")) },
|
||||||
<< indentation << " assert( " << firstVectorName << ".size() == " << secondVectorName << ".size() );" << std::endl
|
{ "className", commandData.className },
|
||||||
<< "#else" << std::endl
|
{ "reducedName", commandData.reducedName},
|
||||||
<< indentation << " if ( " << firstVectorName << ".size() != " << secondVectorName << ".size() )" << std::endl
|
{ "i", indentation}
|
||||||
<< indentation << " {" << std::endl
|
}));
|
||||||
<< indentation << " throw LogicError( \"vk::" << commandData.className << "::" << commandData.reducedName << ": " << firstVectorName << ".size() != " << secondVectorName << ".size()\" );" << std::endl
|
|
||||||
<< indentation << " }" << std::endl
|
|
||||||
<< "#endif // VULKAN_HPP_NO_EXCEPTIONS" << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2707,15 +2763,20 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation,
|
|||||||
os << " )";
|
os << " )";
|
||||||
if (returnsVector)
|
if (returnsVector)
|
||||||
{
|
{
|
||||||
// for vector returns, copy over the results from the non-unique function into a vector of Unique stuff
|
std::string const stringTemplate = R"(;
|
||||||
os << ";" << std::endl
|
${i} std::vector<Unique${type}> unique${type}s;
|
||||||
<< indentation << " std::vector<Unique" << type << "> unique" << type << "s;" << std::endl
|
${i} unique${type}s.reserve( ${typeValue}s.size() );
|
||||||
<< indentation << " unique" << type << "s.reserve( " << typeValue << "s.size() );" << std::endl
|
${i} for ( auto ${typeValue} : ${typeValue}s )
|
||||||
<< indentation << " for ( auto " << typeValue << " : " << typeValue << "s )" << std::endl
|
${i} {
|
||||||
<< indentation << " {" << std::endl
|
${i} unique${type}s.push_back( Unique${type}( ${typeValue}, deleter ) );
|
||||||
<< indentation << " unique" << type << "s.push_back( Unique" << type << "( " << typeValue << ", deleter ) );" << std::endl
|
${i} }
|
||||||
<< indentation << " }" << std::endl
|
${i} return unique${type}s;
|
||||||
<< indentation << " return unique" << type << "s;" << std::endl;
|
)";
|
||||||
|
os << replaceWithMap(stringTemplate, std::map<std::string, std::string>{
|
||||||
|
{ "i", indentation },
|
||||||
|
{ "type", type },
|
||||||
|
{ "typeValue", typeValue }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
# include <vector>
|
# include <vector>
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
static_assert( VK_HEADER_VERSION == 46 , "Wrong VK_HEADER_VERSION!" );
|
static_assert( VK_HEADER_VERSION == 48 , "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
|
||||||
@ -6398,9 +6398,6 @@ namespace vk
|
|||||||
ePhysicalDeviceExternalBufferInfoKHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX,
|
ePhysicalDeviceExternalBufferInfoKHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX,
|
||||||
eExternalBufferPropertiesKHX = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX,
|
eExternalBufferPropertiesKHX = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX,
|
||||||
ePhysicalDeviceIdPropertiesKHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX,
|
ePhysicalDeviceIdPropertiesKHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX,
|
||||||
ePhysicalDeviceProperties2KHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX,
|
|
||||||
eImageFormatProperties2KHX = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX,
|
|
||||||
ePhysicalDeviceImageFormatInfo2KHX = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX,
|
|
||||||
eExternalMemoryBufferCreateInfoKHX = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX,
|
eExternalMemoryBufferCreateInfoKHX = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX,
|
||||||
eExternalMemoryImageCreateInfoKHX = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX,
|
eExternalMemoryImageCreateInfoKHX = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX,
|
||||||
eExportMemoryAllocateInfoKHX = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX,
|
eExportMemoryAllocateInfoKHX = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX,
|
||||||
@ -21835,8 +21832,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
|
result = static_cast<Result>( vkEnumerateInstanceLayerProperties( &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::enumerateInstanceLayerProperties" );
|
return createResultValue( result, properties, "vk::enumerateInstanceLayerProperties" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -21868,8 +21865,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
|
result = static_cast<Result>( vkEnumerateInstanceExtensionProperties( layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::enumerateInstanceExtensionProperties" );
|
return createResultValue( result, properties, "vk::enumerateInstanceExtensionProperties" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -24754,8 +24751,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
|
result = static_cast<Result>( vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), &dataSize, reinterpret_cast<void*>( data.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( dataSize <= data.size() );
|
assert( dataSize <= data.size() );
|
||||||
data.resize( dataSize );
|
data.resize( dataSize );
|
||||||
return createResultValue( result, data, "vk::Device::getPipelineCacheData" );
|
return createResultValue( result, data, "vk::Device::getPipelineCacheData" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -25302,8 +25299,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) );
|
result = static_cast<Result>( vkGetSwapchainImagesKHR( m_device, static_cast<VkSwapchainKHR>( swapchain ), &swapchainImageCount, reinterpret_cast<VkImage*>( swapchainImages.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( swapchainImageCount <= swapchainImages.size() );
|
assert( swapchainImageCount <= swapchainImages.size() );
|
||||||
swapchainImages.resize( swapchainImageCount );
|
swapchainImages.resize( swapchainImageCount );
|
||||||
return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" );
|
return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26236,8 +26233,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
|
result = static_cast<Result>( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast<VkLayerProperties*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" );
|
return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26262,8 +26259,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
|
result = static_cast<Result>( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast<VkExtensionProperties*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" );
|
return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26305,8 +26302,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( properties.data() ) ) );
|
result = static_cast<Result>( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPropertiesKHR*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" );
|
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26331,8 +26328,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( properties.data() ) ) );
|
result = static_cast<Result>( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast<VkDisplayPlanePropertiesKHR*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" );
|
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26357,8 +26354,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( displays.data() ) ) );
|
result = static_cast<Result>( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast<VkDisplayKHR*>( displays.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( displayCount <= displays.size() );
|
assert( displayCount <= displays.size() );
|
||||||
displays.resize( displayCount );
|
displays.resize( displayCount );
|
||||||
return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
|
return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26383,8 +26380,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( properties.data() ) ) );
|
result = static_cast<Result>( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast<VkDisplayKHR>( display ), &propertyCount, reinterpret_cast<VkDisplayModePropertiesKHR*>( properties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( propertyCount <= properties.size() );
|
assert( propertyCount <= properties.size() );
|
||||||
properties.resize( propertyCount );
|
properties.resize( propertyCount );
|
||||||
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" );
|
return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26474,8 +26471,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( surfaceFormats.data() ) ) );
|
result = static_cast<Result>( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &surfaceFormatCount, reinterpret_cast<VkSurfaceFormatKHR*>( surfaceFormats.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( surfaceFormatCount <= surfaceFormats.size() );
|
assert( surfaceFormatCount <= surfaceFormats.size() );
|
||||||
surfaceFormats.resize( surfaceFormatCount );
|
surfaceFormats.resize( surfaceFormatCount );
|
||||||
return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" );
|
return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26500,8 +26497,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( presentModes.data() ) ) );
|
result = static_cast<Result>( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &presentModeCount, reinterpret_cast<VkPresentModeKHR*>( presentModes.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( presentModeCount <= presentModes.size() );
|
assert( presentModeCount <= presentModes.size() );
|
||||||
presentModes.resize( presentModeCount );
|
presentModes.resize( presentModeCount );
|
||||||
return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" );
|
return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -26779,8 +26776,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, reinterpret_cast<VkRect2D*>( rects.data() ) ) );
|
result = static_cast<Result>( vkGetPhysicalDevicePresentRectanglesKHX( m_physicalDevice, static_cast<VkSurfaceKHR>( surface ), &rectCount, reinterpret_cast<VkRect2D*>( rects.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( rectCount <= rects.size() );
|
assert( rectCount <= rects.size() );
|
||||||
rects.resize( rectCount );
|
rects.resize( rectCount );
|
||||||
return createResultValue( result, rects, "vk::PhysicalDevice::getPresentRectanglesKHX" );
|
return createResultValue( result, rects, "vk::PhysicalDevice::getPresentRectanglesKHX" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -27239,8 +27236,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) );
|
result = static_cast<Result>( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast<VkPhysicalDevice*>( physicalDevices.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( physicalDeviceCount <= physicalDevices.size() );
|
assert( physicalDeviceCount <= physicalDevices.size() );
|
||||||
physicalDevices.resize( physicalDeviceCount );
|
physicalDevices.resize( physicalDeviceCount );
|
||||||
return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" );
|
return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -27511,8 +27508,8 @@ namespace vk
|
|||||||
result = static_cast<Result>( vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupPropertiesKHX*>( physicalDeviceGroupProperties.data() ) ) );
|
result = static_cast<Result>( vkEnumeratePhysicalDeviceGroupsKHX( m_instance, &physicalDeviceGroupCount, reinterpret_cast<VkPhysicalDeviceGroupPropertiesKHX*>( physicalDeviceGroupProperties.data() ) ) );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
assert( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
|
assert( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() );
|
||||||
physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
|
physicalDeviceGroupProperties.resize( physicalDeviceGroupCount );
|
||||||
return createResultValue( result, physicalDeviceGroupProperties, "vk::Instance::enumeratePhysicalDeviceGroupsKHX" );
|
return createResultValue( result, physicalDeviceGroupProperties, "vk::Instance::enumeratePhysicalDeviceGroupsKHX" );
|
||||||
}
|
}
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -28859,9 +28856,6 @@ namespace vk
|
|||||||
case StructureType::ePhysicalDeviceExternalBufferInfoKHX: return "PhysicalDeviceExternalBufferInfoKHX";
|
case StructureType::ePhysicalDeviceExternalBufferInfoKHX: return "PhysicalDeviceExternalBufferInfoKHX";
|
||||||
case StructureType::eExternalBufferPropertiesKHX: return "ExternalBufferPropertiesKHX";
|
case StructureType::eExternalBufferPropertiesKHX: return "ExternalBufferPropertiesKHX";
|
||||||
case StructureType::ePhysicalDeviceIdPropertiesKHX: return "PhysicalDeviceIdPropertiesKHX";
|
case StructureType::ePhysicalDeviceIdPropertiesKHX: return "PhysicalDeviceIdPropertiesKHX";
|
||||||
case StructureType::ePhysicalDeviceProperties2KHX: return "PhysicalDeviceProperties2KHX";
|
|
||||||
case StructureType::eImageFormatProperties2KHX: return "ImageFormatProperties2KHX";
|
|
||||||
case StructureType::ePhysicalDeviceImageFormatInfo2KHX: return "PhysicalDeviceImageFormatInfo2KHX";
|
|
||||||
case StructureType::eExternalMemoryBufferCreateInfoKHX: return "ExternalMemoryBufferCreateInfoKHX";
|
case StructureType::eExternalMemoryBufferCreateInfoKHX: return "ExternalMemoryBufferCreateInfoKHX";
|
||||||
case StructureType::eExternalMemoryImageCreateInfoKHX: return "ExternalMemoryImageCreateInfoKHX";
|
case StructureType::eExternalMemoryImageCreateInfoKHX: return "ExternalMemoryImageCreateInfoKHX";
|
||||||
case StructureType::eExportMemoryAllocateInfoKHX: return "ExportMemoryAllocateInfoKHX";
|
case StructureType::eExportMemoryAllocateInfoKHX: return "ExportMemoryAllocateInfoKHX";
|
||||||
|
Loading…
Reference in New Issue
Block a user