diff --git a/README.md b/README.md index f9eb8dd..c840168 100644 --- a/README.md +++ b/README.md @@ -137,11 +137,11 @@ device.createImage(&ci, allocator, &image); To provide a more object oriented feeling we're providing classes for each handle which include all Vulkan functions where the first parameter matches the handle. In addition to this we made a few changes to the signatures of the member functions * To disable the enhanced mode put ```#define VKCPP_DISABLE_ENHANCED_MODE``` before including ```vk_cpp.h``` -* ```(count, T*)``` has been replaced by ```std::vector``` -* ```const char *``` has been replaced by ```std::string ``` -* ```T const*``` has been replaced by ```T const &``` to allow temporary objects. This is useful to pass small structures like ```vk::ClearColorValue``` or ```vk::Extent*``` +* ```(count, T*)``` has been replaced by ```vk::ArrayProxy```, which can be created out of a single T, a (count, T*) pair, a std::array, a vector, or an initializer_list. +* ```const char *``` has been replaced by ```const std::string &``` +* ```const T *``` has been replaced by ```const T &``` to allow temporary objects. This is useful to pass small structures like ```vk::ClearColorValue``` or ```vk::Extent*``` ```commandBuffer.clearColorImage(image, layout, std::array{1.0f, 1.0f, 1.0f, 1.0f}, {...});``` -Optional parameters are being replaced by ```Optional const &``` which accept a type of ```T const&```. ```nullptr``` can be used to initialize an empty ```Optional```. +Optional parameters are being replaced by ```Optional``` which accept a type of ```const T```, ```T```, or ```const std::string```. ```nullptr``` can be used to initialize an empty ```Optional```. * The wrapper will throw a ```std::system_error``` if a ```vk::Result``` return value is not an success code. If there's only a single success code it's not returned at all. In this case functions with a single output value do return this output value instead. Here are a few code examples: diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index 43fc171..ca1edc3 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -233,6 +233,67 @@ std::string const optionalClassHeader = ( "\n" ); +std::string const arrayProxyHeader = ( + " template \n" + " class ArrayProxy\n" + " {\n" + " public:\n" + " ArrayProxy(T & ptr)\n" + " : m_count(1)\n" + " , m_ptr(&ptr)\n" + " {}\n" + "\n" + " ArrayProxy(uint32_t count, T * ptr)\n" + " : m_count(count)\n" + " , m_ptr(ptr)\n" + " {}\n" + "\n" + " template \n" + " ArrayProxy(std::array::type, N> & data)\n" + " : m_count(N)\n" + " , m_ptr(data.data())\n" + " {}\n" + "\n" + " template \n" + " ArrayProxy(std::array::type, N> const& data)\n" + " : m_count(N)\n" + " , m_ptr(data.data())\n" + " {}\n" + "\n" + " template ::type>>\n" + " ArrayProxy(std::vector::type, Allocator> & data)\n" + " : m_count(static_cast(data.size()))\n" + " , m_ptr(data.data())\n" + " {}\n" + "\n" + " template ::type>>\n" + " ArrayProxy(std::vector::type, Allocator> const& data)\n" + " : m_count(static_cast(data.size()))\n" + " , m_ptr(data.data())\n" + " {}\n" + "\n" + " ArrayProxy(std::initializer_list const& data)\n" + " : m_count(static_cast(data.end() - data.begin()))\n" + " , m_ptr(data.begin())\n" + " {}\n" + "\n" + " uint32_t size() const\n" + " {\n" + " return m_count;\n" + " }\n" + "\n" + " T * data() const\n" + " {\n" + " return m_ptr;\n" + " }\n" + "\n" + " private:\n" + " uint32_t m_count;\n" + " T * m_ptr;\n" + " };\n" + "\n" +); + // trim from end std::string trimEnd(std::string const& input) { @@ -350,13 +411,6 @@ struct VkData std::string vulkanLicenseHeader; }; -enum class FunctionType -{ - standard, - singular, - initializerList -}; - void createDefaults( VkData const& vkData, std::map & defaultValues ); std::string determineFunctionName(std::string const& name, CommandData const& commandData); std::string determineReturnType(CommandData const& commandData, size_t returnIndex, bool isVector = false); @@ -393,16 +447,16 @@ void readTypeUnionMember( tinyxml2::XMLElement * element, std::vector & tags); void readTypes(tinyxml2::XMLElement * element, VkData & vkData); void sortDependencies( std::list & dependencies ); -std::string reduceName(std::string const& name, bool stripTrailingS = false); +std::string reduceName(std::string const& name); std::string strip(std::string const& value, std::string const& prefix, std::string const& tag = std::string()); std::string stripCommand(std::string const& value); std::string toCamelCase(std::string const& value); std::string toUpperCase(std::string const& name); -void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set const& vkTypes, std::map const& vectorParameters, size_t returnIndex, bool firstCall, FunctionType ft); +void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set const& vkTypes, std::map const& vectorParameters, size_t returnIndex, bool firstCall); void writeEnumsToString(std::ofstream & ofs, VkData const& vkData); void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::vector const& successCodes); -void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set const& vkTypes, size_t returnIndex, std::map const& vectorParameters, FunctionType ft); -void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map const& vectorParameters, FunctionType ft); +void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set const& vkTypes, size_t returnIndex, std::map const& vectorParameters); +void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map const& vectorParameters); void writeMemberData(std::ofstream & ofs, MemberData const& memberData, std::set const& vkTypes); void writeStructConstructor( std::ofstream & ofs, std::string const& name, std::string const& memberName, StructData const& structData, std::set const& vkTypes, std::map const& defaultValues ); void writeStructGetter( std::ofstream & ofs, MemberData const& memberData, std::string const& memberName, std::set const& vkTypes, bool constVersion ); @@ -1472,11 +1526,10 @@ void sortDependencies( std::list & dependencies ) dependencies.swap(sortedDependencies); } -std::string reduceName(std::string const& name, bool stripTrailingS) +std::string reduceName(std::string const& name) { - assert(1 < name.length()); std::string reducedName; - if ((name[0] == 'p') && (isupper(name[1]) || name[1] == 'p')) + if ((name[0] == 'p') && (1 < name.length()) && (isupper(name[1]) || name[1] == 'p')) { reducedName = strip(name, "p"); reducedName[0] = tolower(reducedName[0]); @@ -1486,11 +1539,6 @@ std::string reduceName(std::string const& name, bool stripTrailingS) reducedName = name; } - if (stripTrailingS && (reducedName.back() == 's')) - { - reducedName.pop_back(); - } - return reducedName; } @@ -1557,7 +1605,7 @@ std::string toUpperCase(std::string const& name) return convertedName; } -void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set const& vkTypes, std::map const& vectorParameters, size_t returnIndex, bool firstCall, FunctionType ft) +void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set const& vkTypes, std::map const& vectorParameters, size_t returnIndex, bool firstCall) { std::map countIndices; for (std::map::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it) @@ -1594,25 +1642,10 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde } else { - if (ft == FunctionType::singular) + ofs << reduceName(commandData.arguments[it->second].name) << ".size() "; + if (templateIndex == it->second) { - if (templateIndex == it->second) - { - ofs << "static_cast<" << commandData.arguments[it->first].pureType << ">( sizeof( T ) )"; - } - else - { - ofs << "1"; - } - } - else - { - ofs << "static_cast<" << commandData.arguments[it->first].pureType << ">( " << reduceName(commandData.arguments[it->second].name) << ".size() "; - if (templateIndex == it->second) - { - ofs << "* sizeof( T ) "; - } - ofs << ")"; + ofs << "* sizeof( T ) "; } } } @@ -1640,21 +1673,7 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde { ofs << "Vk"; } - ofs << commandData.arguments[it->first].pureType << "*>( "; - if (ft == FunctionType::singular) - { - ofs << "&"; - } - ofs << reduceName(commandData.arguments[it->first].name, ft == FunctionType::singular); - if ((ft == FunctionType::standard) || ((ft != FunctionType::singular) && (it->first == returnIndex))) - { - ofs << ".data()"; - } - else if (ft == FunctionType::initializerList) - { - ofs << ".begin()"; - } - ofs << " )"; + ofs << commandData.arguments[it->first].pureType << "*>( " << reduceName(commandData.arguments[it->first].name) << ".data() )"; } else if (commandData.arguments[it->first].pureType == "char") { @@ -1670,22 +1689,7 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde } else { - if (ft == FunctionType::singular) - { - ofs << "&"; - } - ofs << reduceName(commandData.arguments[it->first].name, ft == FunctionType::singular); - switch (ft) - { - case FunctionType::initializerList: - ofs << ".begin()"; - break; - case FunctionType::standard: - ofs << ".data()"; - break; - default: - break; - } + ofs << reduceName(commandData.arguments[it->first].name) << ".data()"; } } } @@ -1778,7 +1782,7 @@ void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, st << indentation << " }" << std::endl; } -void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set const& vkTypes, size_t returnIndex, std::map const& vectorParameters, FunctionType ft) +void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set const& vkTypes, size_t returnIndex, std::map const& vectorParameters) { ofs << indentation << "{" << std::endl; @@ -1789,7 +1793,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: } // add some error checks if multiple vectors need to have the same size - if ((ft != FunctionType::singular) && (1 < vectorParameters.size())) + if (1 < vectorParameters.size()) { for (std::map::const_iterator it0 = vectorParameters.begin(); it0 != vectorParameters.end(); ++it0) { @@ -1812,36 +1816,33 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: // write the local variable to hold a returned value if ((returnIndex != ~0) && (commandData.returnType != returnType)) { - ofs << indentation << " " << ((ft == FunctionType::singular) ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(commandData.arguments[returnIndex].name, ft == FunctionType::singular); + ofs << indentation << " " << returnType << " " << reduceName(commandData.arguments[returnIndex].name); - if (ft != FunctionType::singular) + std::map::const_iterator it = vectorParameters.find(returnIndex); + if (it != vectorParameters.end() && !commandData.twoStep) { - std::map::const_iterator it = vectorParameters.find(returnIndex); - if (it != vectorParameters.end() && !commandData.twoStep) + std::string size; + if ((it->second == ~0) && !commandData.arguments[returnIndex].len.empty()) { - std::string size; - if ((it->second == ~0) && !commandData.arguments[returnIndex].len.empty()) + size = reduceName(commandData.arguments[returnIndex].len); + size_t pos = size.find("->"); + assert(pos != std::string::npos); + size.replace(pos, 2, "."); + size += "()"; + } + else + { + for (std::map::const_iterator sit = vectorParameters.begin(); sit != vectorParameters.end(); ++sit) { - size = reduceName(commandData.arguments[returnIndex].len); - size_t pos = size.find("->"); - assert(pos != std::string::npos); - size.replace(pos, 2, "."); - size += "()"; - } - else - { - for (std::map::const_iterator sit = vectorParameters.begin(); sit != vectorParameters.end(); ++sit) + if ((sit->first != returnIndex) && (sit->second == it->second)) { - if ((sit->first != returnIndex) && (sit->second == it->second)) - { - size = reduceName(commandData.arguments[sit->first].name) + ".size()"; - break; - } + size = reduceName(commandData.arguments[sit->first].name) + ".size()"; + break; } } - assert(!size.empty()); - ofs << "( " << size << " )"; } + assert(!size.empty()); + ofs << "( " << size << " )"; } ofs << ";" << std::endl; } @@ -1879,7 +1880,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: assert(!commandData.twoStep); ofs << "return "; } - writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, true, ft); + writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, true); if (commandData.returnType == "Result") { ofs << " )"; @@ -1913,7 +1914,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: { ofs << indentation << " "; } - writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, false, ft); + writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, false); if (commandData.returnType == "Result") { ofs << " )"; @@ -1937,7 +1938,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: // return the returned value if ((returnIndex != ~0) && (commandData.returnType != returnType)) { - ofs << indentation << " return " << reduceName(commandData.arguments[returnIndex].name, ft == FunctionType::singular) << ";" << std::endl; + ofs << indentation << " return " << reduceName(commandData.arguments[returnIndex].name) << ";" << std::endl; } else if (returnType == "Result") { @@ -1947,7 +1948,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std: ofs << indentation << "}" << std::endl; } -void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map const& vectorParameters, FunctionType ft) +void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map const& vectorParameters) { std::set skippedArguments; for (std::map::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it) @@ -1978,7 +1979,7 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st { ofs << "inline "; } - ofs << (((ft == FunctionType::singular) && (returnIndex != ~0)) ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(name, ft == FunctionType::singular) << "("; + ofs << returnType << " " << reduceName(name) << "("; if (skippedArguments.size() + (commandData.handleCommand ? 1 : 0) < commandData.arguments.size()) { size_t lastArgument = ~0; @@ -2004,85 +2005,54 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st std::map::const_iterator it = vectorParameters.find(i); size_t pos = commandData.arguments[i].type.find('*'); - if ((it == vectorParameters.end()) && (pos == std::string::npos)) + if (it == vectorParameters.end()) { - ofs << commandData.arguments[i].type << " " << commandData.arguments[i].name; - if (!commandData.arguments[i].arraySize.empty()) + if (pos == std::string::npos) { - ofs << "[" << commandData.arguments[i].arraySize << "]"; + ofs << commandData.arguments[i].type << " " << reduceName(commandData.arguments[i].name); + if (!commandData.arguments[i].arraySize.empty()) + { + ofs << "[" << commandData.arguments[i].arraySize << "]"; + } + } + else + { + assert(commandData.arguments[i].type[pos] == '*'); + if (commandData.arguments[i].optional) + { + ofs << "Optional<" << trimEnd(commandData.arguments[i].type.substr(0, pos)) << "> " << reduceName(commandData.arguments[i].name) << " = nullptr"; + } + else if (commandData.arguments[i].type.find("char") == std::string::npos) + { + ofs << trimEnd(commandData.arguments[i].type.substr(0, pos)) << " & " << reduceName(commandData.arguments[i].name); + } + else + { + ofs << "const std::string & " << reduceName(commandData.arguments[i].name); + } } } else { bool optional = commandData.arguments[i].optional && ((it == vectorParameters.end()) || (it->second == ~0)); - if (optional) + assert(pos != std::string::npos); + assert(commandData.arguments[i].type[pos] == '*'); + if (commandData.arguments[i].type.find("char") != std::string::npos) { - ofs << "Optional<"; - } - if (vectorParameters.find(i) == vectorParameters.end()) - { - assert(pos != std::string::npos); - if (commandData.arguments[i].type.find("char") != std::string::npos) + if (optional) { - ofs << "std::string const"; + ofs << "Optional " << reduceName(commandData.arguments[i].name) << " = nullptr"; } else { - assert(commandData.arguments[i].type[pos] == '*'); - ofs << trimEnd(commandData.arguments[i].type.substr(0, pos)); + ofs << "const std::string & " << reduceName(commandData.arguments[i].name); } } else { - if (templateIndex == i) - { - switch (ft) - { - case FunctionType::initializerList : - ofs << "std::initializer_list"; - break; - case FunctionType::singular : - ofs << "T"; - break; - case FunctionType::standard : - ofs << "std::vector"; - break; - } - } - else if (commandData.arguments[i].pureType == "char") - { - ofs << "std::string"; - } - else - { - switch (ft) - { - case FunctionType::initializerList : - ofs << "std::initializer_list<"; - break; - case FunctionType::standard : - ofs << "std::vector<"; - break; - } - ofs << commandData.arguments[i].pureType; - if (ft != FunctionType::singular) - { - ofs << ">"; - } - } - if (commandData.arguments[i].type.find("const") != std::string::npos) - { - ofs << " const"; - } - } - if (optional) - { - ofs << "> const"; - } - ofs << " & " << reduceName(commandData.arguments[i].name, ft == FunctionType::singular); - if (optional && (i == lastArgument)) - { - ofs << " = nullptr"; + assert(!optional); + bool isConst = (commandData.arguments[i].type.find("const") != std::string::npos); + ofs << "ArrayProxy<" << ((templateIndex == i) ? (isConst ? "const T" : "T") : trimEnd(commandData.arguments[i].type.substr(0, pos))) << "> " << reduceName(commandData.arguments[i].name); } } argEncountered = true; @@ -2359,18 +2329,6 @@ void writeTypeCommand( std::ofstream & ofs, DependencyData const& dependencyData } } -bool hasSizedVectorParameter(std::map const& vectorParameters, size_t returnIndex) -{ - for (auto it = vectorParameters.begin(); it != vectorParameters.end(); ++it) - { - if ((it->first != returnIndex) && (it->second != ~0)) - { - return true; - } - } - return false; -} - void writeTypeCommandEnhanced(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, DependencyData const& dependencyData, CommandData const& commandData, std::set const& vkTypes) { enterProtect(ofs, commandData.protect); @@ -2380,17 +2338,8 @@ void writeTypeCommandEnhanced(std::ofstream & ofs, std::string const& indentatio std::map::const_iterator returnVector = vectorParameters.find(returnIndex); std::string returnType = determineReturnType(commandData, returnIndex, returnVector != vectorParameters.end()); - writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::standard); - writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::standard); - if (hasSizedVectorParameter(vectorParameters, returnIndex)) - { - ofs << std::endl; - writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::initializerList); - writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::initializerList); - ofs << std::endl; - writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::singular); - writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::singular); - } + writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters); + writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters); leaveProtect(ofs, commandData.protect); } @@ -2927,7 +2876,8 @@ int main( int argc, char **argv ) ofs << "namespace vk" << std::endl << "{" << std::endl << flagsHeader - << optionalClassHeader; + << optionalClassHeader + << arrayProxyHeader; // first of all, write out vk::Result and the exception handling stuff std::list::const_iterator it = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [](DependencyData const& dp) { return dp.name == "Result"; }); diff --git a/vulkan/vk_cpp.hpp b/vulkan/vk_cpp.hpp index 90583d0..8ac7d01 100644 --- a/vulkan/vk_cpp.hpp +++ b/vulkan/vk_cpp.hpp @@ -199,6 +199,64 @@ namespace vk RefType *m_ptr; }; + template + class ArrayProxy + { + public: + ArrayProxy(T & ptr) + : m_count(1) + , m_ptr(&ptr) + {} + + ArrayProxy(uint32_t count, T * ptr) + : m_count(count) + , m_ptr(ptr) + {} + + template + ArrayProxy(std::array::type, N> & data) + : m_count(N) + , m_ptr(data.data()) + {} + + template + ArrayProxy(std::array::type, N> const& data) + : m_count(N) + , m_ptr(data.data()) + {} + + template ::type>> + ArrayProxy(std::vector::type, Allocator> & data) + : m_count(static_cast(data.size())) + , m_ptr(data.data()) + {} + + template ::type>> + ArrayProxy(std::vector::type, Allocator> const& data) + : m_count(static_cast(data.size())) + , m_ptr(data.data()) + {} + + ArrayProxy(std::initializer_list const& data) + : m_count(static_cast(data.end() - data.begin())) + , m_ptr(data.begin()) + {} + + uint32_t size() const + { + return m_count; + } + + T * data() const + { + return m_ptr; + } + + private: + uint32_t m_count; + T * m_ptr; + }; + enum class Result { eSuccess = VK_SUCCESS, @@ -17652,19 +17710,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void setViewport( uint32_t firstViewport, std::vector const & viewports ) const + void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const { - vkCmdSetViewport( m_commandBuffer, firstViewport, static_cast( viewports.size() ), reinterpret_cast( viewports.data() ) ); - } - - void setViewport( uint32_t firstViewport, std::initializer_list const & viewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, static_cast( viewports.size() ), reinterpret_cast( viewports.begin() ) ); - } - - void setViewport( uint32_t firstViewport, Viewport const & viewport ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, 1, reinterpret_cast( &viewport ) ); + vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17674,19 +17722,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void setScissor( uint32_t firstScissor, std::vector const & scissors ) const + void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const { - vkCmdSetScissor( m_commandBuffer, firstScissor, static_cast( scissors.size() ), reinterpret_cast( scissors.data() ) ); - } - - void setScissor( uint32_t firstScissor, std::initializer_list const & scissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, static_cast( scissors.size() ), reinterpret_cast( scissors.begin() ) ); - } - - void setScissor( uint32_t firstScissor, Rect2D const & scissor ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, 1, reinterpret_cast( &scissor ) ); + vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17794,19 +17832,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, std::vector const & descriptorSets, std::vector const & dynamicOffsets ) const + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, static_cast( descriptorSets.size() ), reinterpret_cast( descriptorSets.data() ), static_cast( dynamicOffsets.size() ), dynamicOffsets.data() ); - } - - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, std::initializer_list const & descriptorSets, std::initializer_list const & dynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, static_cast( descriptorSets.size() ), reinterpret_cast( descriptorSets.begin() ), static_cast( dynamicOffsets.size() ), dynamicOffsets.begin() ); - } - - void bindDescriptorSet( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, DescriptorSet const & descriptorSet, uint32_t const & dynamicOffset ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, 1, reinterpret_cast( &descriptorSet ), 1, &dynamicOffset ); + vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17830,27 +17858,13 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void bindVertexBuffers( uint32_t firstBinding, std::vector const & buffers, std::vector const & offsets ) const + void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const { if ( buffers.size() != offsets.size() ) { throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, static_cast( buffers.size() ), reinterpret_cast( buffers.data() ), offsets.data() ); - } - - void bindVertexBuffers( uint32_t firstBinding, std::initializer_list const & buffers, std::initializer_list const & offsets ) const - { - if ( buffers.size() != offsets.size() ) - { - throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); - } - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, static_cast( buffers.size() ), reinterpret_cast( buffers.begin() ), offsets.begin() ); - } - - void bindVertexBuffer( uint32_t firstBinding, Buffer const & buffer, DeviceSize const & offset ) const - { - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, 1, reinterpret_cast( &buffer ), &offset ); + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17944,19 +17958,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, std::vector const & regions ) const + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), static_cast( regions.size() ), reinterpret_cast( regions.data() ) ); - } - - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, std::initializer_list const & regions ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ) ); - } - - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, BufferCopy const & region ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), 1, reinterpret_cast( ®ion ) ); + vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17966,19 +17970,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const & regions ) const + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.data() ) ); - } - - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list const & regions ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ) ); - } - - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageCopy const & region ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), 1, reinterpret_cast( ®ion ) ); + vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -17988,19 +17982,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const & regions, Filter filter ) const + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.data() ), static_cast( filter ) ); - } - - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list const & regions, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ), static_cast( filter ) ); - } - - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageBlit const & region, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), 1, reinterpret_cast( ®ion ), static_cast( filter ) ); + vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18010,19 +17994,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, std::vector const & regions ) const + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.data() ) ); - } - - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, std::initializer_list const & regions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ) ); - } - - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, BufferImageCopy const & region ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), 1, reinterpret_cast( ®ion ) ); + vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18032,19 +18006,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, std::vector const & regions ) const + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), static_cast( regions.size() ), reinterpret_cast( regions.data() ) ); - } - - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, std::initializer_list const & regions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ) ); - } - - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, BufferImageCopy const & region ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), 1, reinterpret_cast( ®ion ) ); + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18055,10 +18019,10 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE template - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, std::vector const & data ) const + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const { static_assert( sizeof( T ) % sizeof( uint32_t ) == 0, "wrong size of template type T" ); - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, static_cast( data.size() * sizeof( T ) ), reinterpret_cast( data.data() ) ); + vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18082,19 +18046,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, std::vector const & ranges ) const + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), static_cast( ranges.size() ), reinterpret_cast( ranges.data() ) ); - } - - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, std::initializer_list const & ranges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), static_cast( ranges.size() ), reinterpret_cast( ranges.begin() ) ); - } - - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ImageSubresourceRange const & range ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), 1, reinterpret_cast( &range ) ); + vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18104,19 +18058,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, std::vector const & ranges ) const + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), static_cast( ranges.size() ), reinterpret_cast( ranges.data() ) ); - } - - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, std::initializer_list const & ranges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), static_cast( ranges.size() ), reinterpret_cast( ranges.begin() ) ); - } - - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ImageSubresourceRange const & range ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), 1, reinterpret_cast( &range ) ); + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18126,19 +18070,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void clearAttachments( std::vector const & attachments, std::vector const & rects ) const + void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const { - vkCmdClearAttachments( m_commandBuffer, static_cast( attachments.size() ), reinterpret_cast( attachments.data() ), static_cast( rects.size() ), reinterpret_cast( rects.data() ) ); - } - - void clearAttachments( std::initializer_list const & attachments, std::initializer_list const & rects ) const - { - vkCmdClearAttachments( m_commandBuffer, static_cast( attachments.size() ), reinterpret_cast( attachments.begin() ), static_cast( rects.size() ), reinterpret_cast( rects.begin() ) ); - } - - void clearAttachment( ClearAttachment const & attachment, ClearRect const & rect ) const - { - vkCmdClearAttachments( m_commandBuffer, 1, reinterpret_cast( &attachment ), 1, reinterpret_cast( &rect ) ); + vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18148,19 +18082,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::vector const & regions ) const + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.data() ) ); - } - - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list const & regions ) const - { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), static_cast( regions.size() ), reinterpret_cast( regions.begin() ) ); - } - - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageResolve const & region ) const - { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), 1, reinterpret_cast( ®ion ) ); + vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18198,19 +18122,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void waitEvents( std::vector const & events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, std::vector const & memoryBarriers, std::vector const & bufferMemoryBarriers, std::vector const & imageMemoryBarriers ) const + void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const { - vkCmdWaitEvents( m_commandBuffer, static_cast( events.size() ), reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( memoryBarriers.size() ), reinterpret_cast( memoryBarriers.data() ), static_cast( bufferMemoryBarriers.size() ), reinterpret_cast( bufferMemoryBarriers.data() ), static_cast( imageMemoryBarriers.size() ), reinterpret_cast( imageMemoryBarriers.data() ) ); - } - - void waitEvents( std::initializer_list const & events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, std::initializer_list const & memoryBarriers, std::initializer_list const & bufferMemoryBarriers, std::initializer_list const & imageMemoryBarriers ) const - { - vkCmdWaitEvents( m_commandBuffer, static_cast( events.size() ), reinterpret_cast( events.begin() ), static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( memoryBarriers.size() ), reinterpret_cast( memoryBarriers.begin() ), static_cast( bufferMemoryBarriers.size() ), reinterpret_cast( bufferMemoryBarriers.begin() ), static_cast( imageMemoryBarriers.size() ), reinterpret_cast( imageMemoryBarriers.begin() ) ); - } - - void waitEvent( Event const & event, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const - { - vkCmdWaitEvents( m_commandBuffer, 1, reinterpret_cast( &event ), static_cast( srcStageMask ), static_cast( dstStageMask ), 1, reinterpret_cast( &memoryBarrier ), 1, reinterpret_cast( &bufferMemoryBarrier ), 1, reinterpret_cast( &imageMemoryBarrier ) ); + vkCmdWaitEvents( m_commandBuffer, events.size() , reinterpret_cast( events.data() ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18220,19 +18134,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, std::vector const & memoryBarriers, std::vector const & bufferMemoryBarriers, std::vector const & imageMemoryBarriers ) const + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), static_cast( memoryBarriers.size() ), reinterpret_cast( memoryBarriers.data() ), static_cast( bufferMemoryBarriers.size() ), reinterpret_cast( bufferMemoryBarriers.data() ), static_cast( imageMemoryBarriers.size() ), reinterpret_cast( imageMemoryBarriers.data() ) ); - } - - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, std::initializer_list const & memoryBarriers, std::initializer_list const & bufferMemoryBarriers, std::initializer_list const & imageMemoryBarriers ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), static_cast( memoryBarriers.size() ), reinterpret_cast( memoryBarriers.begin() ), static_cast( bufferMemoryBarriers.size() ), reinterpret_cast( bufferMemoryBarriers.begin() ), static_cast( imageMemoryBarriers.size() ), reinterpret_cast( imageMemoryBarriers.begin() ) ); - } - - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), 1, reinterpret_cast( &memoryBarrier ), 1, reinterpret_cast( &bufferMemoryBarrier ), 1, reinterpret_cast( &imageMemoryBarrier ) ); + vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18313,21 +18217,9 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE template - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, std::vector const & values ) const + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, static_cast( values.size() * sizeof( T ) ), reinterpret_cast( values.data() ) ); - } - - template - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, std::initializer_list const & values ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, static_cast( values.size() * sizeof( T ) ), reinterpret_cast( values.begin() ) ); - } - - template - void pushConstant( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, T const & value ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, static_cast( sizeof( T ) ), reinterpret_cast( &value ) ); + vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18377,19 +18269,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void executeCommands( std::vector const & commandBuffers ) const + void executeCommands( ArrayProxy commandBuffers ) const { - vkCmdExecuteCommands( m_commandBuffer, static_cast( commandBuffers.size() ), reinterpret_cast( commandBuffers.data() ) ); - } - - void executeCommands( std::initializer_list const & commandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, static_cast( commandBuffers.size() ), reinterpret_cast( commandBuffers.begin() ) ); - } - - void executeCommand( CommandBuffer const & commandBuffer ) const - { - vkCmdExecuteCommands( m_commandBuffer, 1, reinterpret_cast( &commandBuffer ) ); + vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -18962,27 +18844,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void submit( std::vector const & submits, Fence fence ) const + void submit( ArrayProxy submits, Fence fence ) const { - Result result = static_cast( vkQueueSubmit( m_queue, static_cast( submits.size() ), reinterpret_cast( submits.data() ), static_cast( fence ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Queue::submit" ); - } - } - - void submit( std::initializer_list const & submits, Fence fence ) const - { - Result result = static_cast( vkQueueSubmit( m_queue, static_cast( submits.size() ), reinterpret_cast( submits.begin() ), static_cast( fence ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Queue::submit" ); - } - } - - void submit( SubmitInfo const & submit, Fence fence ) const - { - Result result = static_cast( vkQueueSubmit( m_queue, 1, reinterpret_cast( &submit ), static_cast( fence ) ) ); + Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Queue::submit" ); @@ -19014,27 +18878,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void bindSparse( std::vector const & bindInfo, Fence fence ) const + void bindSparse( ArrayProxy bindInfo, Fence fence ) const { - Result result = static_cast( vkQueueBindSparse( m_queue, static_cast( bindInfo.size() ), reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Queue::bindSparse" ); - } - } - - void bindSparse( std::initializer_list const & bindInfo, Fence fence ) const - { - Result result = static_cast( vkQueueBindSparse( m_queue, static_cast( bindInfo.size() ), reinterpret_cast( bindInfo.begin() ), static_cast( fence ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Queue::bindSparse" ); - } - } - - void bindSparse( BindSparseInfo const & bindInfo, Fence fence ) const - { - Result result = static_cast( vkQueueBindSparse( m_queue, 1, reinterpret_cast( &bindInfo ), static_cast( fence ) ) ); + Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Queue::bindSparse" ); @@ -20314,7 +20160,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( std::string const & name ) const + PFN_vkVoidFunction getProcAddr( const std::string & name ) const { return vkGetDeviceProcAddr( m_device, name.c_str() ); } @@ -20326,7 +20172,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroy( Optional const & allocator = nullptr ) const + void destroy( Optional allocator = nullptr ) const { vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator)) ); } @@ -20370,7 +20216,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - DeviceMemory allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional const & allocator = nullptr ) const + DeviceMemory allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const { DeviceMemory memory; Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &memory ) ) ); @@ -20388,7 +20234,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void freeMemory( DeviceMemory memory, Optional const & allocator = nullptr ) const + void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const { vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator)) ); } @@ -20434,27 +20280,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void flushMappedMemoryRanges( std::vector const & memoryRanges ) const + void flushMappedMemoryRanges( ArrayProxy memoryRanges ) const { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::flushMappedMemoryRanges" ); - } - } - - void flushMappedMemoryRanges( std::initializer_list const & memoryRanges ) const - { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.begin() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::flushMappedMemoryRanges" ); - } - } - - void flushMappedMemoryRange( MappedMemoryRange const & memoryRange ) const - { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, 1, reinterpret_cast( &memoryRange ) ) ); + Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::flushMappedMemoryRanges" ); @@ -20468,27 +20296,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void invalidateMappedMemoryRanges( std::vector const & memoryRanges ) const + void invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::invalidateMappedMemoryRanges" ); - } - } - - void invalidateMappedMemoryRanges( std::initializer_list const & memoryRanges ) const - { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, static_cast( memoryRanges.size() ), reinterpret_cast( memoryRanges.begin() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::invalidateMappedMemoryRanges" ); - } - } - - void invalidateMappedMemoryRange( MappedMemoryRange const & memoryRange ) const - { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, 1, reinterpret_cast( &memoryRange ) ) ); + Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::invalidateMappedMemoryRanges" ); @@ -20597,7 +20407,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Fence createFence( const FenceCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Fence createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const { Fence fence; Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &fence ) ) ); @@ -20615,7 +20425,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyFence( Fence fence, Optional const & allocator = nullptr ) const + void destroyFence( Fence fence, Optional allocator = nullptr ) const { vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator)) ); } @@ -20627,27 +20437,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void resetFences( std::vector const & fences ) const + void resetFences( ArrayProxy fences ) const { - Result result = static_cast( vkResetFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::resetFences" ); - } - } - - void resetFences( std::initializer_list const & fences ) const - { - Result result = static_cast( vkResetFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.begin() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::resetFences" ); - } - } - - void resetFence( Fence const & fence ) const - { - Result result = static_cast( vkResetFences( m_device, 1, reinterpret_cast( &fence ) ) ); + Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::resetFences" ); @@ -20680,29 +20472,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Result waitForFences( std::vector const & fences, Bool32 waitAll, uint64_t timeout ) const + Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const { - Result result = static_cast( vkWaitForFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.data() ), waitAll, timeout ) ); - if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) ) - { - throw std::system_error( result, "vk::Device::waitForFences" ); - } - return result; - } - - Result waitForFences( std::initializer_list const & fences, Bool32 waitAll, uint64_t timeout ) const - { - Result result = static_cast( vkWaitForFences( m_device, static_cast( fences.size() ), reinterpret_cast( fences.begin() ), waitAll, timeout ) ); - if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) ) - { - throw std::system_error( result, "vk::Device::waitForFences" ); - } - return result; - } - - Result waitForFence( Fence const & fence, Bool32 waitAll, uint64_t timeout ) const - { - Result result = static_cast( vkWaitForFences( m_device, 1, reinterpret_cast( &fence ), waitAll, timeout ) ); + Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) ) { throw std::system_error( result, "vk::Device::waitForFences" ); @@ -20717,7 +20489,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Semaphore createSemaphore( const SemaphoreCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Semaphore createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const { Semaphore semaphore; Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &semaphore ) ) ); @@ -20735,7 +20507,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroySemaphore( Semaphore semaphore, Optional const & allocator = nullptr ) const + void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const { vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator)) ); } @@ -20747,7 +20519,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Event createEvent( const EventCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Event createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const { Event event; Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &event ) ) ); @@ -20765,7 +20537,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyEvent( Event event, Optional const & allocator = nullptr ) const + void destroyEvent( Event event, Optional allocator = nullptr ) const { vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator)) ); } @@ -20832,7 +20604,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - QueryPool createQueryPool( const QueryPoolCreateInfo & createInfo, Optional const & allocator = nullptr ) const + QueryPool createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const { QueryPool queryPool; Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &queryPool ) ) ); @@ -20850,7 +20622,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyQueryPool( QueryPool queryPool, Optional const & allocator = nullptr ) const + void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const { vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator)) ); } @@ -20863,9 +20635,9 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE template - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, std::vector & data, DeviceSize stride, QueryResultFlags flags ) const + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const { - Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, static_cast( data.size() * sizeof( T ) ), reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); + Result result = static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); if ( ( result != Result::eSuccess ) && ( result != Result::eNotReady ) ) { throw std::system_error( result, "vk::Device::getQueryPoolResults" ); @@ -20880,7 +20652,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Buffer createBuffer( const BufferCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Buffer createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const { Buffer buffer; Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &buffer ) ) ); @@ -20898,7 +20670,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyBuffer( Buffer buffer, Optional const & allocator = nullptr ) const + void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const { vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator)) ); } @@ -20910,7 +20682,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - BufferView createBufferView( const BufferViewCreateInfo & createInfo, Optional const & allocator = nullptr ) const + BufferView createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const { BufferView view; Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); @@ -20928,7 +20700,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyBufferView( BufferView bufferView, Optional const & allocator = nullptr ) const + void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const { vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator)) ); } @@ -20940,7 +20712,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Image createImage( const ImageCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Image createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const { Image image; Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &image ) ) ); @@ -20958,7 +20730,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyImage( Image image, Optional const & allocator = nullptr ) const + void destroyImage( Image image, Optional allocator = nullptr ) const { vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator)) ); } @@ -20984,7 +20756,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - ImageView createImageView( const ImageViewCreateInfo & createInfo, Optional const & allocator = nullptr ) const + ImageView createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const { ImageView view; Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); @@ -21002,7 +20774,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyImageView( ImageView imageView, Optional const & allocator = nullptr ) const + void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const { vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator)) ); } @@ -21014,7 +20786,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - ShaderModule createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional const & allocator = nullptr ) const + ShaderModule createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const { ShaderModule shaderModule; Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &shaderModule ) ) ); @@ -21032,7 +20804,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyShaderModule( ShaderModule shaderModule, Optional const & allocator = nullptr ) const + void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const { vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator)) ); } @@ -21044,7 +20816,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - PipelineCache createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional const & allocator = nullptr ) const + PipelineCache createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const { PipelineCache pipelineCache; Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineCache ) ) ); @@ -21062,7 +20834,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyPipelineCache( PipelineCache pipelineCache, Optional const & allocator = nullptr ) const + void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const { vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator)) ); } @@ -21098,27 +20870,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void mergePipelineCaches( PipelineCache dstCache, std::vector const & srcCaches ) const + void mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), static_cast( srcCaches.size() ), reinterpret_cast( srcCaches.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::mergePipelineCaches" ); - } - } - - void mergePipelineCaches( PipelineCache dstCache, std::initializer_list const & srcCaches ) const - { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), static_cast( srcCaches.size() ), reinterpret_cast( srcCaches.begin() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::mergePipelineCaches" ); - } - } - - void mergePipelineCache( PipelineCache dstCache, PipelineCache const & srcCache ) const - { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), 1, reinterpret_cast( &srcCache ) ) ); + Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::mergePipelineCaches" ); @@ -21132,38 +20886,16 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - std::vector createGraphicsPipelines( PipelineCache pipelineCache, std::vector const & createInfos, Optional const & allocator = nullptr ) const + std::vector createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const { std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); + Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::createGraphicsPipelines" ); } return pipelines; } - - std::vector createGraphicsPipelines( PipelineCache pipelineCache, std::initializer_list const & createInfos, Optional const & allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.begin() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createGraphicsPipelines" ); - } - return pipelines; - } - - Pipeline createGraphicsPipeline( PipelineCache pipelineCache, GraphicsPipelineCreateInfo const & createInfo, Optional const & allocator = nullptr ) const - { - Pipeline pipeline; - Result result = static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createGraphicsPipelines" ); - } - return pipeline; - } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const @@ -21172,38 +20904,16 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - std::vector createComputePipelines( PipelineCache pipelineCache, std::vector const & createInfos, Optional const & allocator = nullptr ) const + std::vector createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const { std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); + Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::createComputePipelines" ); } return pipelines; } - - std::vector createComputePipelines( PipelineCache pipelineCache, std::initializer_list const & createInfos, Optional const & allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), static_cast( createInfos.size() ), reinterpret_cast( createInfos.begin() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( pipelines.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createComputePipelines" ); - } - return pipelines; - } - - Pipeline createComputePipeline( PipelineCache pipelineCache, ComputePipelineCreateInfo const & createInfo, Optional const & allocator = nullptr ) const - { - Pipeline pipeline; - Result result = static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipeline ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createComputePipelines" ); - } - return pipeline; - } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const @@ -21212,7 +20922,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyPipeline( Pipeline pipeline, Optional const & allocator = nullptr ) const + void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const { vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator)) ); } @@ -21224,7 +20934,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - PipelineLayout createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional const & allocator = nullptr ) const + PipelineLayout createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const { PipelineLayout pipelineLayout; Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineLayout ) ) ); @@ -21242,7 +20952,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional const & allocator = nullptr ) const + void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const { vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator)) ); } @@ -21254,7 +20964,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Sampler createSampler( const SamplerCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Sampler createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const { Sampler sampler; Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &sampler ) ) ); @@ -21272,7 +20982,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroySampler( Sampler sampler, Optional const & allocator = nullptr ) const + void destroySampler( Sampler sampler, Optional allocator = nullptr ) const { vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator)) ); } @@ -21284,7 +20994,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - DescriptorSetLayout createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional const & allocator = nullptr ) const + DescriptorSetLayout createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const { DescriptorSetLayout setLayout; Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &setLayout ) ) ); @@ -21302,7 +21012,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional const & allocator = nullptr ) const + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const { vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator)) ); } @@ -21314,7 +21024,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - DescriptorPool createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional const & allocator = nullptr ) const + DescriptorPool createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const { DescriptorPool descriptorPool; Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &descriptorPool ) ) ); @@ -21332,7 +21042,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyDescriptorPool( DescriptorPool descriptorPool, Optional const & allocator = nullptr ) const + void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const { vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator)) ); } @@ -21380,27 +21090,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void freeDescriptorSets( DescriptorPool descriptorPool, std::vector const & descriptorSets ) const + void freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), static_cast( descriptorSets.size() ), reinterpret_cast( descriptorSets.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::freeDescriptorSets" ); - } - } - - void freeDescriptorSets( DescriptorPool descriptorPool, std::initializer_list const & descriptorSets ) const - { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), static_cast( descriptorSets.size() ), reinterpret_cast( descriptorSets.begin() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::freeDescriptorSets" ); - } - } - - void freeDescriptorSet( DescriptorPool descriptorPool, DescriptorSet const & descriptorSet ) const - { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), 1, reinterpret_cast( &descriptorSet ) ) ); + Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::freeDescriptorSets" ); @@ -21414,19 +21106,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void updateDescriptorSets( std::vector const & descriptorWrites, std::vector const & descriptorCopies ) const + void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const { - vkUpdateDescriptorSets( m_device, static_cast( descriptorWrites.size() ), reinterpret_cast( descriptorWrites.data() ), static_cast( descriptorCopies.size() ), reinterpret_cast( descriptorCopies.data() ) ); - } - - void updateDescriptorSets( std::initializer_list const & descriptorWrites, std::initializer_list const & descriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, static_cast( descriptorWrites.size() ), reinterpret_cast( descriptorWrites.begin() ), static_cast( descriptorCopies.size() ), reinterpret_cast( descriptorCopies.begin() ) ); - } - - void updateDescriptorSet( WriteDescriptorSet const & descriptorWrite, CopyDescriptorSet const & descriptorCopie ) const - { - vkUpdateDescriptorSets( m_device, 1, reinterpret_cast( &descriptorWrite ), 1, reinterpret_cast( &descriptorCopie ) ); + vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -21436,7 +21118,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Framebuffer createFramebuffer( const FramebufferCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Framebuffer createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const { Framebuffer framebuffer; Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &framebuffer ) ) ); @@ -21454,7 +21136,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyFramebuffer( Framebuffer framebuffer, Optional const & allocator = nullptr ) const + void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const { vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator)) ); } @@ -21466,7 +21148,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - RenderPass createRenderPass( const RenderPassCreateInfo & createInfo, Optional const & allocator = nullptr ) const + RenderPass createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const { RenderPass renderPass; Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &renderPass ) ) ); @@ -21484,7 +21166,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyRenderPass( RenderPass renderPass, Optional const & allocator = nullptr ) const + void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const { vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator)) ); } @@ -21510,7 +21192,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - CommandPool createCommandPool( const CommandPoolCreateInfo & createInfo, Optional const & allocator = nullptr ) const + CommandPool createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const { CommandPool commandPool; Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &commandPool ) ) ); @@ -21528,7 +21210,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyCommandPool( CommandPool commandPool, Optional const & allocator = nullptr ) const + void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const { vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator)) ); } @@ -21576,19 +21258,9 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void freeCommandBuffers( CommandPool commandPool, std::vector const & commandBuffers ) const + void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), static_cast( commandBuffers.size() ), reinterpret_cast( commandBuffers.data() ) ); - } - - void freeCommandBuffers( CommandPool commandPool, std::initializer_list const & commandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), static_cast( commandBuffers.size() ), reinterpret_cast( commandBuffers.begin() ) ); - } - - void freeCommandBuffer( CommandPool commandPool, CommandBuffer const & commandBuffer ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), 1, reinterpret_cast( &commandBuffer ) ); + vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ @@ -21598,38 +21270,16 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - std::vector createSharedSwapchainsKHR( std::vector const & createInfos, Optional const & allocator = nullptr ) const + std::vector createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr ) const { std::vector swapchains( createInfos.size() ); - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, static_cast( createInfos.size() ), reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); if ( result != Result::eSuccess ) { throw std::system_error( result, "vk::Device::createSharedSwapchainsKHR" ); } return swapchains; } - - std::vector createSharedSwapchainsKHR( std::initializer_list const & createInfos, Optional const & allocator = nullptr ) const - { - std::vector swapchains( createInfos.size() ); - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, static_cast( createInfos.size() ), reinterpret_cast( createInfos.begin() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createSharedSwapchainsKHR" ); - } - return swapchains; - } - - SwapchainKHR createSharedSwapchainsKHR( SwapchainCreateInfoKHR const & createInfo, Optional const & allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); - if ( result != Result::eSuccess ) - { - throw std::system_error( result, "vk::Device::createSharedSwapchainsKHR" ); - } - return swapchain; - } #endif /*VKCPP_DISABLE_ENHANCED_MODE*/ Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const @@ -21638,7 +21288,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - SwapchainKHR createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SwapchainKHR createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SwapchainKHR swapchain; Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); @@ -21656,7 +21306,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroySwapchainKHR( SwapchainKHR swapchain, Optional const & allocator = nullptr ) const + void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const { vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator)) ); } @@ -21846,7 +21496,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - Device createDevice( const DeviceCreateInfo & createInfo, Optional const & allocator = nullptr ) const + Device createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const { Device device; Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &device ) ) ); @@ -21892,7 +21542,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - std::vector enumerateDeviceExtensionProperties( Optional const & layerName = nullptr ) const + std::vector enumerateDeviceExtensionProperties( Optional layerName = nullptr ) const { std::vector properties; uint32_t propertyCount; @@ -22049,7 +21699,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - DisplayModeKHR createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + DisplayModeKHR createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { DisplayModeKHR mode; Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &mode ) ) ); @@ -22462,7 +22112,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroy( Optional const & allocator = nullptr ) const + void destroy( Optional allocator = nullptr ) const { vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator)) ); } @@ -22502,7 +22152,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( std::string const & name ) const + PFN_vkVoidFunction getProcAddr( const std::string & name ) const { return vkGetInstanceProcAddr( m_instance, name.c_str() ); } @@ -22517,7 +22167,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_ANDROID_KHR - SurfaceKHR createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22536,7 +22186,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - SurfaceKHR createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22557,7 +22207,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_MIR_KHR - SurfaceKHR createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22576,7 +22226,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroySurfaceKHR( SurfaceKHR surface, Optional const & allocator = nullptr ) const + void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const { vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator)) ); } @@ -22591,7 +22241,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_WAYLAND_KHR - SurfaceKHR createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22613,7 +22263,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_WIN32_KHR - SurfaceKHR createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22635,7 +22285,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_XLIB_KHR - SurfaceKHR createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22657,7 +22307,7 @@ namespace vk #ifndef VKCPP_DISABLE_ENHANCED_MODE #ifdef VK_USE_PLATFORM_XCB_KHR - SurfaceKHR createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional const & allocator = nullptr ) const + SurfaceKHR createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const { SurfaceKHR surface; Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); @@ -22676,7 +22326,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - DebugReportCallbackEXT createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional const & allocator = nullptr ) const + DebugReportCallbackEXT createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const { DebugReportCallbackEXT callback; Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &callback ) ) ); @@ -22694,7 +22344,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional const & allocator = nullptr ) const + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const { vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator)) ); } @@ -22706,7 +22356,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, std::string const & layerPrefix, std::string const & message ) const + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const { vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); } @@ -22747,7 +22397,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - inline Instance createInstance( const InstanceCreateInfo & createInfo, Optional const & allocator = nullptr ) + inline Instance createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ) { Instance instance; Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &instance ) ) ); @@ -22793,7 +22443,7 @@ namespace vk } #ifndef VKCPP_DISABLE_ENHANCED_MODE - inline std::vector enumerateInstanceExtensionProperties( Optional const & layerName = nullptr ) + inline std::vector enumerateInstanceExtensionProperties( Optional layerName = nullptr ) { std::vector properties; uint32_t propertyCount;