From 43b2c5ef6637acef273d2f37aad46f93fa7da864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 13 Feb 2017 09:23:35 +0100 Subject: [PATCH] Changed *Deleter classes to not hold a pointer to the controlling object, but hold a copy of it. (#76) --- VulkanHppGenerator.cpp | 1192 +++---- vulkan/vulkan.hpp | 6862 ++++++++++++++++++++++------------------ 2 files changed, 4497 insertions(+), 3557 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 8f2d55e..7970c8d 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -443,10 +443,6 @@ std::string const uniqueHandleHeader = { R"( #endif #ifndef VULKAN_HPP_NO_SMART_HANDLE - class Device; - class Instance; - struct AllocationCallbacks; - template class UniqueHandle { @@ -568,17 +564,24 @@ struct CommandData CommandData(std::string const& t, std::string const& fn) : returnType(t) , fullName(fn) + , returnParam(~0) + , templateParam(~0) , twoStep(false) {} - std::string returnType; + std::string className; + std::string enhancedReturnType; std::string fullName; - std::string reducedName; std::vector params; - std::vector successCodes; std::string protect; - std::string handle; + std::string reducedName; + size_t returnParam; + std::string returnType; + std::set skippedParams; + std::vector successCodes; + size_t templateParam; bool twoStep; + std::map vectorParams; }; struct DependencyData @@ -691,16 +694,16 @@ struct VkData }; void createDefaults( VkData const& vkData, std::map & defaultValues ); -void determineReducedName(CommandData const& commandData); -std::string determineReturnType(CommandData const& commandData, size_t returnIndex, bool isVector = false); -std::set determineSkippedParams(size_t returnIndex, std::map const& vectorParams); +void determineEnhancedReturnType(CommandData & commandData); +void determineReducedName(CommandData & commandData); +void determineReturnParam(CommandData & commandData); +void determineSkippedParams(CommandData & commandData); +void determineTemplateParam(CommandData & commandData); +void determineVectorParams(CommandData & commandData); void enterProtect(std::ostream &os, std::string const& protect); std::string extractTag(std::string const& name); -size_t findReturnIndex(CommandData const& commandData, std::map const& vectorParams); std::string findTag(std::string const& name, std::set const& tags); -size_t findTemplateIndex(std::vector const& params, std::map const& vectorParams); std::string generateEnumNameForFlags(std::string const& name); -std::map getVectorParams(std::vector const& params); bool hasPointerParam(std::vector const& params); bool isVectorSizeParam(std::map const& vectorParams, size_t idx); void leaveProtect(std::ostream &os, std::string const& protect); @@ -740,30 +743,33 @@ std::string toCamelCase(std::string const& value); std::string toUpperCase(std::string const& name); std::string trimStart(std::string const& input); std::string trimEnd(std::string const& input); -void writeCall(std::ostream & os, CommandData const& commandData, size_t templateIndex, std::set const& vkTypes, std::map const& vectorParams, size_t returnIndex, bool firstCall, bool singular); -void writeDeleterClasses(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData); -void writeDeleterOperators(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData); +void writeCall(std::ostream & os, CommandData const& commandData, std::set const& vkTypes, bool firstCall, bool singular); +void writeDeleterClasses(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData); +void writeDeleterForwardDeclarations(std::ofstream &ofs, std::pair> const& deleterTypes, std::map const& deleterData); void writeEnumsToString(std::ofstream & ofs, EnumData const& enumData); void writeEnumsToString(std::ofstream & ofs, VkData const& vkData); void writeFlagsToString(std::ofstream & ofs, std::string const& flagsName, EnumData const &enumData); void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::vector const& successCodes); -void writeFunctionBody(std::ostream & os, 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& vectorParams, bool singular); -void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, CommandData const& commandData, std::string const& className, - std::set const& skippedParams, size_t returnIndex, std::map const& vectorParams, - std::map const& deleterData, bool singular); -std::set writeFunctionHeader(std::ostream & os, std::map const& skippedParams, VkData const& vkData, std::string const& indentation, - std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, - std::map const& vectorParams, bool singular, bool unique); +void writeFunctionBody(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool enhanced, bool singular, bool unique); +void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool singular); +void writeFunctionBodyStandard(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData); +void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool singular); +void writeFunctionDeclaration(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, bool enhanced, bool singular, bool unique); +void writeFunctionDefinition(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool enhanced, bool singular, bool unique); +void writeFunctionHeaderArguments(std::ostream & os, VkData const& vkData, CommandData const& commandData, bool enhanced, bool singular, bool withDefaults); +void writeFunctionHeaderName(std::ostream & os, std::string const& name, bool singular, bool unique); +void writeFunctionHeaderReturnType(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool enhanced, bool singular, bool unique); +void writeFunctionHeaderTemplate(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool withDefault); void writeStructConstructor( std::ofstream & ofs, std::string const& name, StructData const& structData, std::set const& vkTypes, std::map const& defaultValues ); void writeStructSetter( std::ofstream & ofs, std::string const& name, MemberData const& memberData, std::set const& vkTypes, std::map const& structs ); void writeTypeCommand(std::ofstream & ofs, VkData const& vkData, DependencyData const& dependencyData); -void writeTypeCommandEnhanced(std::ostream & os, VkData const& vkData, std::string const& indentation, std::string const& className, std::string const& functionName, - DependencyData const& dependencyData, CommandData const& commandData); +void writeTypeCommandDeclaration(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData); +void writeTypeCommandDeclarationEnhanced(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData); +void writeTypeCommandDeclarationStandard(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData); +void writeTypeCommandDefinition(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData); +void writeTypeCommandDefinitionEnhanced(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData); +void writeTypeCommandDefinitionStandard(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData); void writeTypeCommandParam(std::ostream & os, ParamData const& param, std::set const& vkTypes); -void writeTypeCommandStandard(std::ostream & os, std::string const& indentation, std::string const& functionName, DependencyData const& dependencyData, - CommandData const& commandData, std::set const& vkTypes); void writeTypeEnum(std::ofstream & ofs, EnumData const& enumData); void writeTypeFlags(std::ofstream & ofs, std::string const& flagsName, FlagData const& flagData, EnumData const& enumData); void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData const& dependencyData, HandleData const& handle, std::list const& dependencies); @@ -862,58 +868,107 @@ void determineReducedName(CommandData & commandData) } } -std::string determineReturnType(CommandData const& commandData, size_t returnIndex, bool isVector) +void determineEnhancedReturnType(CommandData & commandData) { std::string returnType; - if ( (returnIndex != ~0) - && ( (commandData.returnType == "void") - || ( (commandData.returnType == "Result") - && ( (commandData.successCodes.size() == 1) - || ( (commandData.successCodes.size() == 2) - && (commandData.successCodes[1] == "eIncomplete") - && commandData.twoStep))))) + if ((commandData.returnParam != ~0) + && ((commandData.returnType == "void") + || ((commandData.returnType == "Result") + && ((commandData.successCodes.size() == 1) + || ((commandData.successCodes.size() == 2) + && (commandData.successCodes[1] == "eIncomplete") + && commandData.twoStep))))) { - if (isVector) + if (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()) { - if (commandData.params[returnIndex].pureType == "void") + if (commandData.params[commandData.returnParam].pureType == "void") { - returnType = "std::vector"; + commandData.enhancedReturnType = "std::vector"; } else { - returnType = "std::vector<" + commandData.params[returnIndex].pureType + ",Allocator>"; + commandData.enhancedReturnType = "std::vector<" + commandData.params[commandData.returnParam].pureType + ",Allocator>"; } } else { - assert(commandData.params[returnIndex].type.back() == '*'); - assert(commandData.params[returnIndex].type.find("const") == std::string::npos); - returnType = commandData.params[returnIndex].type; - returnType.pop_back(); + assert(commandData.params[commandData.returnParam].type.back() == '*'); + assert(commandData.params[commandData.returnParam].type.find("const") == std::string::npos); + commandData.enhancedReturnType = commandData.params[commandData.returnParam].type; + commandData.enhancedReturnType.pop_back(); } } else if ((commandData.returnType == "Result") && (commandData.successCodes.size() == 1)) { // an original return of type "Result" with just one successCode is changed to void, errors throw an exception - returnType = "void"; + commandData.enhancedReturnType = "void"; } else { // the return type just stays the original return type - returnType = commandData.returnType; + commandData.enhancedReturnType = commandData.returnType; } - return returnType; } -std::set determineSkippedParams(size_t returnIndex, std::map const& vectorParams) +void determineReturnParam(CommandData & commandData) { - std::set skippedParams; - std::for_each(vectorParams.begin(), vectorParams.end(), [&skippedParams](std::pair const& vp) { if (vp.second != ~0) skippedParams.insert(vp.second); }); - if (returnIndex != ~0) + if ((commandData.returnType == "Result") || (commandData.returnType == "void")) { - skippedParams.insert(returnIndex); + for (size_t i = 0; i < commandData.params.size(); i++) + { + if ((commandData.params[i].type.find('*') != std::string::npos) + && (commandData.params[i].type.find("const") == std::string::npos) + && !isVectorSizeParam(commandData.vectorParams, i) + && ((commandData.vectorParams.find(i) == commandData.vectorParams.end()) || commandData.twoStep || (commandData.successCodes.size() == 1))) + { + auto paramIt = std::find_if(commandData.params.begin() + i + 1, commandData.params.end(), [](ParamData const& pd) + { + return (pd.type.find('*') != std::string::npos) && (pd.type.find("const") == std::string::npos); + }); + commandData.returnParam = paramIt != commandData.params.end() ? ~0 : i; + } + } + } +} + +void determineSkippedParams(CommandData & commandData) +{ + std::for_each(commandData.vectorParams.begin(), commandData.vectorParams.end(), [&commandData](std::pair const& vp) { if (vp.second != ~0) commandData.skippedParams.insert(vp.second); }); + if (commandData.returnParam != ~0) + { + commandData.skippedParams.insert(commandData.returnParam); + } +} + +void determineTemplateParam(CommandData & commandData) +{ + for (size_t i = 0; i < commandData.params.size(); i++) + { + if (((commandData.params[i].name == "pData") || (commandData.params[i].name == "pValues")) + && (commandData.vectorParams.find(i) != commandData.vectorParams.end())) + { + commandData.templateParam = i; + } + } + assert((commandData.templateParam == ~0) || (commandData.vectorParams.find(commandData.templateParam) != commandData.vectorParams.end())); +} + +void determineVectorParams(CommandData & commandData) +{ + for (auto it = commandData.params.begin(), begin = it, end = commandData.params.end(); it != end; ++it) + { + if (!it->len.empty()) + { + auto findLambda = [it](ParamData const& pd) { return pd.name == it->len; }; + auto findIt = std::find_if(begin, it, findLambda); + assert((std::count_if(begin, end, findLambda) == 0) || (findIt < it)); + commandData.vectorParams.insert(std::make_pair(std::distance(begin, it), findIt < it ? std::distance(begin, findIt) : ~0)); + assert((commandData.vectorParams[std::distance(begin, it)] != ~0) + || (it->len == "null-terminated") + || (it->len == "pAllocateInfo::descriptorSetCount") + || (it->len == "pAllocateInfo::commandBufferCount")); + } } - return skippedParams; } void enterProtect(std::ostream &os, std::string const& protect) @@ -934,28 +989,6 @@ std::string extractTag(std::string const& name) return name.substr(start + 1, end - start - 1); } -size_t findReturnIndex(CommandData const& commandData, std::map const& vectorParams) -{ - if ((commandData.returnType == "Result") || (commandData.returnType == "void")) - { - for (size_t i = 0; i < commandData.params.size(); i++) - { - if ((commandData.params[i].type.find('*') != std::string::npos) - && (commandData.params[i].type.find("const") == std::string::npos) - && !isVectorSizeParam(vectorParams, i) - && ((vectorParams.find(i) == vectorParams.end()) || commandData.twoStep || (commandData.successCodes.size() == 1))) - { - auto paramIt = std::find_if(commandData.params.begin() + i + 1, commandData.params.end(), [](ParamData const& pd) - { - return (pd.type.find('*') != std::string::npos) && (pd.type.find("const") == std::string::npos); - }); - return paramIt != commandData.params.end() ? ~0 : i; - } - } - } - return ~0; -} - std::string findTag(std::string const& name, std::set const& tags) { auto tagIt = std::find_if(tags.begin(), tags.end(), [&name](std::string const& t) @@ -966,19 +999,6 @@ std::string findTag(std::string const& name, std::set const& tags) return tagIt != tags.end() ? *tagIt : ""; } -size_t findTemplateIndex(std::vector const& params, std::map const& vectorParams) -{ - for (size_t i = 0; i < params.size(); i++) - { - if (((params[i].name == "pData") || (params[i].name == "pValues")) - && (vectorParams.find(i) != vectorParams.end())) - { - return i; - } - } - return ~0; -} - std::string generateEnumNameForFlags(std::string const& name) { std::string generatedName = name; @@ -988,26 +1008,6 @@ std::string generateEnumNameForFlags(std::string const& name) return generatedName; } -std::map getVectorParams(std::vector const& params) -{ - std::map lenParameters; - for (auto it = params.begin(), begin = it, end = params.end(); it != end; ++it) - { - if (!it->len.empty()) - { - auto findLambda = [it](ParamData const& pd) { return pd.name == it->len; }; - auto findIt = std::find_if(begin, it, findLambda); - assert((std::count_if(begin, end, findLambda) == 0) || (findIt < it)); - lenParameters.insert(std::make_pair(std::distance(begin, it), findIt < it ? std::distance(begin, findIt) : ~0)); - assert( (lenParameters[std::distance(begin, it)] != ~0) - || (it->len == "null-terminated") - || (it->len == "pAllocateInfo::descriptorSetCount") - || (it->len == "pAllocateInfo::commandBufferCount")); - } - } - return lenParameters; -} - bool hasPointerParam(std::vector const& params) { auto it = std::find_if(params.begin(), params.end(), [](ParamData const& pd) @@ -1035,13 +1035,20 @@ void linkCommandToHandle(VkData & vkData, CommandData & commandData) { assert(!commandData.params.empty()); std::map::iterator hit = vkData.handles.find(commandData.params[0].pureType); - if (hit != vkData.handles.end()) + if (hit == vkData.handles.end()) { - hit->second.commands.push_back(commandData.fullName); - commandData.handle = hit->first; + hit = vkData.handles.find(""); + } + assert(hit != vkData.handles.end()); - DependencyData const& commandDD = vkData.dependencies.back(); - std::list::iterator handleDD = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [hit](DependencyData const& dd) { return dd.name == hit->first; }); + hit->second.commands.push_back(commandData.fullName); + commandData.className = hit->first; + + DependencyData const& commandDD = vkData.dependencies.back(); + std::list::iterator handleDD = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [hit](DependencyData const& dd) { return dd.name == hit->first; }); + assert((handleDD != vkData.dependencies.end()) || hit->first.empty()); + if (handleDD != vkData.dependencies.end()) + { std::copy_if(commandDD.dependencies.begin(), commandDD.dependencies.end(), std::inserter(handleDD->dependencies, handleDD->dependencies.end()), [hit](std::string const& d) { return d != hit->first; }); } } @@ -1201,6 +1208,11 @@ void readCommandsCommand(tinyxml2::XMLElement * element, VkData & vkData) determineReducedName(commandData); linkCommandToHandle(vkData, commandData); registerDeleter(vkData, commandData); + determineVectorParams(commandData); + determineReturnParam(commandData); + determineTemplateParam(commandData); + determineEnhancedReturnType(commandData); + determineSkippedParams(commandData); } std::vector readCommandSuccessCodes(tinyxml2::XMLElement* element, std::set const& tags) @@ -1854,6 +1866,10 @@ void registerDeleter(VkData & vkData, CommandData const& commandData) default: assert(false); } + if (commandData.fullName == "destroyDevice") + { + key = "PhysicalDevice"; + } assert(vkData.deleterTypes[key].find(commandData.params[valueIndex].pureType) == vkData.deleterTypes[key].end()); vkData.deleterTypes[key].insert(commandData.params[valueIndex].pureType); vkData.deleterData[commandData.params[valueIndex].pureType].call = commandData.reducedName; @@ -1993,25 +2009,24 @@ std::string trimEnd(std::string const& input) return result; } -void writeCall(std::ostream & os, CommandData const& commandData, size_t templateIndex, std::set const& vkTypes, - std::map const& vectorParams, size_t returnIndex, bool firstCall, bool singular) +void writeCall(std::ostream & os, CommandData const& commandData, std::set const& vkTypes, bool firstCall, bool singular) { std::map countIndices; - for (std::map::const_iterator it = vectorParams.begin(); it != vectorParams.end(); ++it) + for (std::map::const_iterator it = commandData.vectorParams.begin(); it != commandData.vectorParams.end(); ++it) { countIndices.insert(std::make_pair(it->second, it->first)); } - if ((vectorParams.size() == 1) - && ((commandData.params[vectorParams.begin()->first].len == "dataSize/4") || (commandData.params[vectorParams.begin()->first].len == "latexmath:[$dataSize \\over 4$]"))) + if ((commandData.vectorParams.size() == 1) + && ((commandData.params[commandData.vectorParams.begin()->first].len == "dataSize/4") || (commandData.params[commandData.vectorParams.begin()->first].len == "latexmath:[$dataSize \\over 4$]"))) { assert(commandData.params[3].name == "dataSize"); - countIndices.insert(std::make_pair(3, vectorParams.begin()->first)); + countIndices.insert(std::make_pair(3, commandData.vectorParams.begin()->first)); } assert(islower(commandData.fullName[0])); os << "vk" << static_cast(toupper(commandData.fullName[0])) << commandData.fullName.substr(1) << "( "; size_t i = 0; - if (!commandData.handle.empty()) + if (!commandData.className.empty()) { os << "m_" << commandData.params[0].name; i++; @@ -2025,7 +2040,7 @@ void writeCall(std::ostream & os, CommandData const& commandData, size_t templat std::map::const_iterator it = countIndices.find(i); if (it != countIndices.end()) { - if ((returnIndex == it->second) && commandData.twoStep) + if ((commandData.returnParam == it->second) && commandData.twoStep) { os << "&" << reduceName(commandData.params[it->first].name); } @@ -2039,7 +2054,7 @@ void writeCall(std::ostream & os, CommandData const& commandData, size_t templat { os << reduceName(commandData.params[it->second].name) << ".size() "; } - if (templateIndex == it->second) + if (commandData.templateParam == it->second) { os << "* sizeof( T ) "; } @@ -2047,18 +2062,18 @@ void writeCall(std::ostream & os, CommandData const& commandData, size_t templat } else { - it = vectorParams.find(i); - if (it != vectorParams.end()) + it = commandData.vectorParams.find(i); + if (it != commandData.vectorParams.end()) { assert(commandData.params[it->first].type.back() == '*'); - if ((returnIndex == it->first) && commandData.twoStep && firstCall) + if ((commandData.returnParam == it->first) && commandData.twoStep && firstCall) { os << "nullptr"; } else { std::set::const_iterator vkit = vkTypes.find(commandData.params[it->first].pureType); - if ((vkit != vkTypes.end()) || (it->first == templateIndex)) + if ((vkit != vkTypes.end()) || (it->first == commandData.templateParam)) { os << "reinterpret_cast<"; if (commandData.params[it->first].type.find("const") == 0) @@ -2190,37 +2205,56 @@ void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, st << indentation << " }" << std::endl; } -void writeFunctionBody(std::ostream & os, 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& vectorParams, bool singular) +void writeFunctionBody(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool enhanced, bool singular, bool unique) { os << indentation << "{" << std::endl; - // add a static_assert if a type is templated and its size needs to be some multiple of the original size - if ((templateIndex != ~0) && (commandData.params[templateIndex].pureType != "void")) + if (enhanced) { - os << indentation << " static_assert( sizeof( T ) % sizeof( " << commandData.params[templateIndex].pureType << " ) == 0, \"wrong size of template type T\" );" << std::endl; + if (unique) + { + writeFunctionBodyUnique(os, indentation, vkData, commandData, dependencyData, singular); + } + else + { + writeFunctionBodyEnhanced(os, indentation, vkData, commandData, dependencyData, singular); + } + } + else + { + writeFunctionBodyStandard(os, indentation, vkData, commandData, dependencyData); + } + + os << indentation << "}" << std::endl; +} + +void writeFunctionBodyEnhanced(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool singular) +{ + // add a static_assert if a type is templated and its size needs to be some multiple of the original size + if ((commandData.templateParam != ~0) && (commandData.params[commandData.templateParam].pureType != "void")) + { + os << indentation << " static_assert( sizeof( T ) % sizeof( " << commandData.params[commandData.templateParam].pureType << " ) == 0, \"wrong size of template type T\" );" << std::endl; } // add some error checks if multiple vectors need to have the same size - if (1 < vectorParams.size()) + if (1 < commandData.vectorParams.size()) { - for (std::map::const_iterator it0 = vectorParams.begin(); it0 != vectorParams.end(); ++it0) + for (std::map::const_iterator it0 = commandData.vectorParams.begin(); it0 != commandData.vectorParams.end(); ++it0) { - if (it0->first != returnIndex) + if (it0->first != commandData.returnParam) { - for (std::map::const_iterator it1 = std::next(it0); it1 != vectorParams.end(); ++it1) + for (std::map::const_iterator it1 = std::next(it0); it1 != commandData.vectorParams.end(); ++it1) { - if ((it1->first != returnIndex) && (it0->second == it1->second)) + if ((it1->first != commandData.returnParam) && (it0->second == it1->second)) { os << "#ifdef VULKAN_HPP_NO_EXCEPTIONS" << std::endl - << indentation << " assert( " << reduceName(commandData.params[it0->first].name) << ".size() == " << reduceName(commandData.params[it1->first].name) << ".size() );" << std::endl - << "#else" << std::endl - << indentation << " if ( " << reduceName(commandData.params[it0->first].name) << ".size() != " << reduceName(commandData.params[it1->first].name) << ".size() )" << std::endl - << indentation << " {" << std::endl - << indentation << " throw std::logic_error( \"vk::" << className << "::" << functionName << ": " << reduceName(commandData.params[it0->first].name) << ".size() != " << reduceName(commandData.params[it1->first].name) << ".size()\" );" << std::endl - << indentation << " }" << std::endl - << "#endif // VULKAN_HPP_NO_EXCEPTIONS" << std::endl; + << indentation << " assert( " << reduceName(commandData.params[it0->first].name) << ".size() == " << reduceName(commandData.params[it1->first].name) << ".size() );" << std::endl + << "#else" << std::endl + << indentation << " if ( " << reduceName(commandData.params[it0->first].name) << ".size() != " << reduceName(commandData.params[it1->first].name) << ".size() )" << std::endl + << indentation << " {" << std::endl + << indentation << " throw std::logic_error( \"vk::" << commandData.className << "::" << commandData.reducedName << ": " << reduceName(commandData.params[it0->first].name) << ".size() != " << reduceName(commandData.params[it1->first].name) << ".size()\" );" << std::endl + << indentation << " }" << std::endl + << "#endif // VULKAN_HPP_NO_EXCEPTIONS" << std::endl; } } } @@ -2228,21 +2262,21 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s } // write the local variable to hold a returned value - if (returnIndex != ~0) + if (commandData.returnParam != ~0) { - if (commandData.returnType != returnType) + if (commandData.returnType != commandData.enhancedReturnType) { - os << indentation << " " << (singular ? commandData.params[returnIndex].pureType : returnType) << " " << reduceName(commandData.params[returnIndex].name, singular); + os << indentation << " " << (singular ? commandData.params[commandData.returnParam].pureType : commandData.enhancedReturnType) << " " << reduceName(commandData.params[commandData.returnParam].name, singular); - if ( !singular) + if (!singular) { - std::map::const_iterator it = vectorParams.find(returnIndex); - if (it != vectorParams.end() && !commandData.twoStep) + std::map::const_iterator it = commandData.vectorParams.find(commandData.returnParam); + if (it != commandData.vectorParams.end() && !commandData.twoStep) { std::string size; - if ((it->second == ~0) && !commandData.params[returnIndex].len.empty()) + if ((it->second == ~0) && !commandData.params[commandData.returnParam].len.empty()) { - size = reduceName(commandData.params[returnIndex].len); + size = reduceName(commandData.params[commandData.returnParam].len); size_t pos = size.find("->"); if (pos == std::string::npos) { @@ -2253,9 +2287,9 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s } else { - for (std::map::const_iterator sit = vectorParams.begin(); sit != vectorParams.end(); ++sit) + for (std::map::const_iterator sit = commandData.vectorParams.begin(); sit != commandData.vectorParams.end(); ++sit) { - if ((sit->first != returnIndex) && (sit->second == it->second)) + if ((sit->first != commandData.returnParam) && (sit->second == it->second)) { size = reduceName(commandData.params[sit->first].name) + ".size()"; break; @@ -2270,17 +2304,17 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s } else if (1 < commandData.successCodes.size()) { - os << indentation << " " << commandData.params[returnIndex].pureType << " " << reduceName(commandData.params[returnIndex].name) << ";" << std::endl; + os << indentation << " " << commandData.params[commandData.returnParam].pureType << " " << reduceName(commandData.params[commandData.returnParam].name) << ";" << std::endl; } } // local count variable to hold the size of the vector to fill if (commandData.twoStep) { - assert(returnIndex != ~0); + assert(commandData.returnParam != ~0); - std::map::const_iterator returnit = vectorParams.find(returnIndex); - assert(returnit != vectorParams.end() && (returnit->second != ~0)); + std::map::const_iterator returnit = commandData.vectorParams.find(commandData.returnParam); + assert(returnit != commandData.vectorParams.end() && (returnit->second != ~0)); assert((commandData.returnType == "Result") || (commandData.returnType == "void")); os << indentation << " " << commandData.params[returnit->second].pureType << " " << reduceName(commandData.params[returnit->second].name) << ";" << std::endl; @@ -2295,9 +2329,9 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s if (commandData.twoStep && (1 < commandData.successCodes.size())) { os << ";" << std::endl - << indentation << " do" << std::endl - << indentation << " {" << std::endl - << indentation << " result"; + << indentation << " do" << std::endl + << indentation << " {" << std::endl + << indentation << " result"; localIndentation += " "; } os << " = static_cast( "; @@ -2308,7 +2342,7 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s os << "return "; } assert(dependencyData.name == commandData.fullName); - writeCall(os, commandData, templateIndex, vkTypes, vectorParams, returnIndex, true, singular); + writeCall(os, commandData, vkData.vkTypes, true, singular); if (commandData.returnType == "Result") { os << " )"; @@ -2317,13 +2351,13 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s if (commandData.twoStep) { - std::map::const_iterator returnit = vectorParams.find(returnIndex); + std::map::const_iterator returnit = commandData.vectorParams.find(commandData.returnParam); if (commandData.returnType == "Result") { os << indentation << localIndentation << "if ( ( result == Result::eSuccess ) && " << reduceName(commandData.params[returnit->second].name) << " )" << std::endl - << indentation << localIndentation << "{" << std::endl - << indentation << localIndentation << " "; + << indentation << localIndentation << "{" << std::endl + << indentation << localIndentation << " "; } else { @@ -2344,7 +2378,7 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s } assert(!singular); assert(dependencyData.name == commandData.fullName); - writeCall(os, commandData, templateIndex, vkTypes, vectorParams, returnIndex, false, singular); + writeCall(os, commandData, vkData.vkTypes, false, singular); if (commandData.returnType == "Result") { os << " )"; @@ -2356,20 +2390,20 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s if (1 < commandData.successCodes.size()) { os << indentation << " } while ( result == Result::eIncomplete );" << std::endl - << indentation << " assert( " << reduceName(commandData.params[returnit->second].name) << " <= " << reduceName(commandData.params[returnit->first].name) << ".size() ); " << std::endl - << indentation << " " << reduceName(commandData.params[returnit->first].name) << ".resize( " << reduceName(commandData.params[returnit->second].name) << " ); " << std::endl; + << indentation << " assert( " << reduceName(commandData.params[returnit->second].name) << " <= " << reduceName(commandData.params[returnit->first].name) << ".size() ); " << std::endl + << indentation << " " << reduceName(commandData.params[returnit->first].name) << ".resize( " << reduceName(commandData.params[returnit->second].name) << " ); " << std::endl; } } } - + if ((commandData.returnType == "Result") || !commandData.successCodes.empty()) { os << indentation << " return createResultValue( result, "; - if (returnIndex != ~0) + if (commandData.returnParam != ~0) { - os << reduceName(commandData.params[returnIndex].name, singular) << ", "; + os << reduceName(commandData.params[commandData.returnParam].name, singular) << ", "; } - os << "\"vk::" << (className.empty() ? "" : className + "::") << reduceName(functionName, singular) << "\""; + os << "\"vk::" << (commandData.className.empty() ? "" : commandData.className + "::") << reduceName(commandData.reducedName, singular) << "\""; if (1 < commandData.successCodes.size() && !commandData.twoStep) { os << ", { Result::" << commandData.successCodes[0]; @@ -2381,28 +2415,63 @@ void writeFunctionBody(std::ostream & os, std::string const& indentation, std::s } os << " );" << std::endl; } - else if ((returnIndex != ~0) && (commandData.returnType != returnType)) + else if ((commandData.returnParam != ~0) && (commandData.returnType != commandData.enhancedReturnType)) { - os << indentation << " return " << reduceName(commandData.params[returnIndex].name) << ";" << std::endl; + os << indentation << " return " << reduceName(commandData.params[commandData.returnParam].name) << ";" << std::endl; } - - os << indentation << "}" << std::endl; } -void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, CommandData const& commandData, std::string const& className, - std::set const& skippedParams, size_t returnIndex, std::map const& vectorParams, - std::map const& deleterData, bool singular) +void writeFunctionBodyStandard(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData) { - std::string type = commandData.params[returnIndex].pureType; - std::string typeValue = char(tolower(type[0])) + type.substr(1); - os << indentation << "{" << std::endl - << indentation << " " << type << "Deleter deleter( "; - if (deleterData.find(className) != deleterData.end()) + os << indentation << " "; + bool castReturn = false; + if (commandData.returnType != "void") { - os << "this, "; + os << "return "; + castReturn = (vkData.vkTypes.find(commandData.returnType) != vkData.vkTypes.end()); + if (castReturn) + { + os << "static_cast<" << commandData.returnType << ">( "; + } } - std::map::const_iterator ddit = deleterData.find(type); - assert(ddit != deleterData.end()); + + std::string callName(dependencyData.name); + assert(islower(callName[0])); + callName[0] = toupper(callName[0]); + + os << "vk" << callName << "( "; + if (!commandData.className.empty()) + { + os << "m_" << commandData.params[0].name; + } + bool argEncountered = false; + for (size_t i = commandData.className.empty() ? 0 : 1; i < commandData.params.size(); i++) + { + if (0 < i) + { + os << ", "; + } + writeTypeCommandParam(os, commandData.params[i], vkData.vkTypes); + } + os << " )"; + if (castReturn) + { + os << " )"; + } + os << ";" << std::endl; +} + +void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool singular) +{ + std::string type = commandData.params[commandData.returnParam].pureType; + std::string typeValue = char(tolower(type[0])) + type.substr(1); + os << indentation << " " << type << "Deleter deleter( "; + if (vkData.deleterData.find(commandData.className) != vkData.deleterData.end()) + { + os << "*this, "; + } + std::map::const_iterator ddit = vkData.deleterData.find(type); + assert(ddit != vkData.deleterData.end()); if (ddit->second.pool.empty()) { os << "allocator"; @@ -2412,7 +2481,7 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, os << reduceName(commandData.params[1].name) << "." << char(tolower(ddit->second.pool[0])) << ddit->second.pool.substr(1); } os << " );" << std::endl; - bool returnsVector = !singular && (vectorParams.find(returnIndex) != vectorParams.end()); + bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); if (returnsVector) { os << indentation << " std::vector<" << type << ",Allocator> " << typeValue << "s = "; @@ -2423,9 +2492,9 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, } os << reduceName(commandData.fullName, singular) << "( "; bool argEncountered = false; - for (size_t i = commandData.handle.empty() ? 0 : 1; i < commandData.params.size(); i++) + for (size_t i = commandData.className.empty() ? 0 : 1; i < commandData.params.size(); i++) { - if (skippedParams.find(i) == skippedParams.end()) + if (commandData.skippedParams.find(i) == commandData.skippedParams.end()) { if (argEncountered) { @@ -2433,7 +2502,7 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, } argEncountered = true; - os << reduceName(commandData.params[i].name, singular && (vectorParams.find(i) != vectorParams.end())); + os << reduceName(commandData.params[i].name, singular && (commandData.vectorParams.find(i) != commandData.vectorParams.end())); } } os << " )"; @@ -2452,181 +2521,264 @@ void writeFunctionBodyUnique(std::ostream & os, std::string const& indentation, { os << ", deleter );" << std::endl; } - os << indentation << "}" << std::endl; } -void writeFunctionHeader(std::ostream & os, std::set const& skippedParams, VkData const& vkData, std::string const& indentation, std::string const& returnType, - std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map const& vectorParams, - bool singular, bool unique) +void writeFunctionDeclaration(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, bool enhanced, bool singular, bool unique) { - bool returnsVector = !singular && (vectorParams.find(returnIndex) != vectorParams.end()); - os << indentation; - if ( !singular && (templateIndex != ~0) && ((templateIndex != returnIndex) || (returnType == "Result"))) + if (enhanced) { - assert(returnType.find("Allocator") == std::string::npos); - os << "template " << std::endl - << indentation; + writeFunctionHeaderTemplate(ofs, indentation, commandData, singular, true); } - else if (!singular && (returnType.find("Allocator") != std::string::npos)) + ofs << indentation; + writeFunctionHeaderReturnType(ofs, indentation, commandData, enhanced, singular, unique); + writeFunctionHeaderName(ofs, commandData.reducedName, singular, unique); + writeFunctionHeaderArguments(ofs, vkData, commandData, enhanced, singular, true); + ofs << ";" << std::endl; +} + +void writeFunctionDefinition(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData, bool enhanced, bool singular, bool unique) +{ + if (enhanced) { - assert((returnType.substr(0, 12) == "std::vector<") && (returnType.find(',') != std::string::npos) && (12 < returnType.find(','))); - os << "template >" << std::endl - << indentation; - if (!unique && (returnType != commandData.returnType) && (commandData.returnType != "void")) - { - os << "typename "; - } + writeFunctionHeaderTemplate(ofs, indentation, commandData, singular, false); } - else if (commandData.handle.empty()) + ofs << indentation << "VULKAN_HPP_INLINE "; + writeFunctionHeaderReturnType(ofs, indentation, commandData, enhanced, singular, unique); + if (!commandData.className.empty()) { - os << "VULKAN_HPP_INLINE "; - } - if (unique) - { - if (returnsVector) - { - os << "std::vector<"; - } - os << "Unique" << commandData.params[returnIndex].pureType; - if (returnsVector) - { - os << ">"; - } - os << " "; - } - else if ((returnType != commandData.returnType) && (commandData.returnType != "void")) - { - assert(commandData.returnType == "Result"); - os << "ResultValueType<" << (singular ? commandData.params[returnIndex].pureType : returnType) << ">::type "; - } - else if ((returnIndex != ~0) && (1 < commandData.successCodes.size())) - { - assert(commandData.returnType == "Result"); - os << "ResultValue<" << commandData.params[returnIndex].pureType << "> "; - } - else - { - os << returnType << " "; - } - os << reduceName(name, singular); - if (unique) - { - os << "Unique"; + ofs << commandData.className << "::"; } + writeFunctionHeaderName(ofs, commandData.reducedName, singular, unique); + writeFunctionHeaderArguments(ofs, vkData, commandData, enhanced, singular, false); + ofs << std::endl; + writeFunctionBody(ofs, indentation, vkData, commandData, dependencyData, enhanced, singular, unique); +} + +void writeFunctionHeaderArguments(std::ostream & os, VkData const& vkData, CommandData const& commandData, bool enhanced, bool singular, bool withDefaults) +{ os << "("; - if (skippedParams.size() + (commandData.handle.empty() ? 0 : 1) < commandData.params.size()) + if (enhanced) { - size_t lastArgument = ~0; - for (size_t i = commandData.params.size() - 1; i < commandData.params.size(); i--) + if (commandData.skippedParams.size() + (commandData.className.empty() ? 0 : 1) < commandData.params.size()) { - if (skippedParams.find(i) == skippedParams.end()) + size_t lastArgument = ~0; + for (size_t i = commandData.params.size() - 1; i < commandData.params.size(); i--) { - lastArgument = i; - break; - } - } - - os << " "; - bool argEncountered = false; - for (size_t i = commandData.handle.empty() ? 0 : 1; i < commandData.params.size(); i++) - { - if (skippedParams.find(i) == skippedParams.end()) - { - if (argEncountered) + if (commandData.skippedParams.find(i) == commandData.skippedParams.end()) { - os << ", "; + lastArgument = i; + break; } + } - std::map::const_iterator it = vectorParams.find(i); - size_t pos = commandData.params[i].type.rfind('*'); - if (it == vectorParams.end()) + os << " "; + bool argEncountered = false; + for (size_t i = commandData.className.empty() ? 0 : 1; i < commandData.params.size(); i++) + { + if (commandData.skippedParams.find(i) == commandData.skippedParams.end()) { - if (pos == std::string::npos) + if (argEncountered) { - os << commandData.params[i].type << " " << reduceName(commandData.params[i].name); - if (!commandData.params[i].arraySize.empty()) + os << ", "; + } + + std::map::const_iterator it = commandData.vectorParams.find(i); + size_t pos = commandData.params[i].type.rfind('*'); + if (it == commandData.vectorParams.end()) + { + if (pos == std::string::npos) { - os << "[" << commandData.params[i].arraySize << "]"; - } - if (lastArgument == i) - { - std::map::const_iterator flagIt = vkData.flags.find(commandData.params[i].pureType); - if (flagIt != vkData.flags.end()) + os << commandData.params[i].type << " " << reduceName(commandData.params[i].name); + if (!commandData.params[i].arraySize.empty()) { - std::list::const_iterator depIt = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [&flagIt](DependencyData const& dd) { return(dd.name == flagIt->first); }); - assert(depIt != vkData.dependencies.end()); - assert(depIt->dependencies.size() == 1); - std::map::const_iterator enumIt = vkData.enums.find(*depIt->dependencies.begin()); - assert(enumIt != vkData.enums.end()); - if (enumIt->second.members.empty()) + os << "[" << commandData.params[i].arraySize << "]"; + } + if (lastArgument == i) + { + std::map::const_iterator flagIt = vkData.flags.find(commandData.params[i].pureType); + if (flagIt != vkData.flags.end()) { - os << " = " << commandData.params[i].pureType << "()"; + std::list::const_iterator depIt = std::find_if(vkData.dependencies.begin(), vkData.dependencies.end(), [&flagIt](DependencyData const& dd) { return(dd.name == flagIt->first); }); + assert(depIt != vkData.dependencies.end()); + assert(depIt->dependencies.size() == 1); + if (withDefaults) + { + std::map::const_iterator enumIt = vkData.enums.find(*depIt->dependencies.begin()); + assert(enumIt != vkData.enums.end()); + if (enumIt->second.members.empty()) + { + os << " = " << commandData.params[i].pureType << "()"; + } + } } } } + else + { + assert(commandData.params[i].type[pos] == '*'); + if (commandData.params[i].optional) + { + os << "Optional<" << trimEnd(commandData.params[i].type.substr(0, pos)) << "> " << reduceName(commandData.params[i].name); + if (withDefaults) + { + os << " = nullptr"; + } + } + else if (commandData.params[i].pureType == "void") + { + os << commandData.params[i].type << " " << commandData.params[i].name; + } + else if (commandData.params[i].pureType != "char") + { + os << trimEnd(commandData.params[i].type.substr(0, pos)) << " & " << reduceName(commandData.params[i].name); + } + else + { + os << "const std::string & " << reduceName(commandData.params[i].name); + } + } } else { + bool optional = commandData.params[i].optional && ((it == commandData.vectorParams.end()) || (it->second == ~0)); + assert(pos != std::string::npos); assert(commandData.params[i].type[pos] == '*'); - if (commandData.params[i].optional) + if (commandData.params[i].type.find("char") != std::string::npos) { - os << "Optional<" << trimEnd(commandData.params[i].type.substr(0, pos)) << "> " << reduceName(commandData.params[i].name) << " = nullptr"; - } - else if (commandData.params[i].pureType == "void") - { - os << commandData.params[i].type << " " << commandData.params[i].name; - } - else if (commandData.params[i].pureType != "char") - { - os << trimEnd(commandData.params[i].type.substr(0, pos)) << " & " << reduceName(commandData.params[i].name); + if (optional) + { + os << "Optional " << reduceName(commandData.params[i].name); + if (withDefaults) + { + os << " = nullptr"; + } + } + else + { + os << "const std::string & " << reduceName(commandData.params[i].name); + } } else { - os << "const std::string & " << reduceName(commandData.params[i].name); + assert(!optional); + if (singular) + { + os << trimEnd(commandData.params[i].type.substr(0, pos)) << " & " << reduceName(commandData.params[i].name, true); + } + else + { + bool isConst = (commandData.params[i].type.find("const") != std::string::npos); + os << "ArrayProxy<" << ((commandData.templateParam == i) ? (isConst ? "const T" : "T") : trimEnd(commandData.params[i].type.substr(0, pos))) << "> " << reduceName(commandData.params[i].name); + } } } + argEncountered = true; } - else - { - bool optional = commandData.params[i].optional && ((it == vectorParams.end()) || (it->second == ~0)); - assert(pos != std::string::npos); - assert(commandData.params[i].type[pos] == '*'); - if (commandData.params[i].type.find("char") != std::string::npos) - { - if (optional) - { - os << "Optional " << reduceName(commandData.params[i].name) << " = nullptr"; - } - else - { - os << "const std::string & " << reduceName(commandData.params[i].name); - } - } - else - { - assert(!optional); - if (singular) - { - os << trimEnd(commandData.params[i].type.substr(0, pos)) << " & " << reduceName(commandData.params[i].name, true); - } - else - { - bool isConst = (commandData.params[i].type.find("const") != std::string::npos); - os << "ArrayProxy<" << ((templateIndex == i) ? (isConst ? "const T" : "T") : trimEnd(commandData.params[i].type.substr(0, pos))) << "> " << reduceName(commandData.params[i].name); - } - } - } - argEncountered = true; } + os << " "; + } + } + else + { + bool argEncountered = false; + for (size_t i = commandData.className.empty() ? 0 : 1; i < commandData.params.size(); i++) + { + if (argEncountered) + { + os << ","; + } + + os << " " << commandData.params[i].type << " " << commandData.params[i].name; + if (!commandData.params[i].arraySize.empty()) + { + os << "[" << commandData.params[i].arraySize << "]"; + } + argEncountered = true; + } + if (argEncountered) + { + os << " "; } - os << " "; } os << ")"; - if (!commandData.handle.empty()) + if (!commandData.className.empty()) { os << " const"; } - os << std::endl; +} + +void writeFunctionHeaderName(std::ostream & os, std::string const& name, bool singular, bool unique) +{ + os << reduceName(name, singular); + if (unique) + { + os << "Unique"; + } +} + +void writeFunctionHeaderReturnType(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool enhanced, bool singular, bool unique) +{ + if (enhanced && !singular && (commandData.enhancedReturnType.find("Allocator") != std::string::npos)) + { + if (!unique && (commandData.enhancedReturnType != commandData.returnType) && (commandData.returnType != "void")) + { + os << "typename "; + } + } + if (enhanced) + { + if (unique) + { + bool returnsVector = !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end()); + if (returnsVector) + { + os << "std::vector<"; + } + os << "Unique" << commandData.params[commandData.returnParam].pureType; + if (returnsVector) + { + os << ">"; + } + os << " "; + } + else if ((commandData.enhancedReturnType != commandData.returnType) && (commandData.returnType != "void")) + { + assert(commandData.returnType == "Result"); + os << "ResultValueType<" << (singular ? commandData.params[commandData.returnParam].pureType : commandData.enhancedReturnType) << ">::type "; + } + else if ((commandData.returnParam != ~0) && (1 < commandData.successCodes.size())) + { + assert(commandData.returnType == "Result"); + os << "ResultValue<" << commandData.params[commandData.returnParam].pureType << "> "; + } + else + { + os << commandData.enhancedReturnType << " "; + } + } + else + { + os << commandData.returnType << " "; + } +} + +void writeFunctionHeaderTemplate(std::ostream & os, std::string const& indentation, CommandData const& commandData, bool singular, bool withDefault) +{ + if (!singular && (commandData.templateParam != ~0) && ((commandData.templateParam != commandData.returnParam) || (commandData.enhancedReturnType == "Result"))) + { + assert(commandData.enhancedReturnType.find("Allocator") == std::string::npos); + os << indentation << "template " << std::endl; + } + else if (!singular && (commandData.enhancedReturnType.find("Allocator") != std::string::npos)) + { + assert((commandData.enhancedReturnType.substr(0, 12) == "std::vector<") && (commandData.enhancedReturnType.find(',') != std::string::npos) && (12 < commandData.enhancedReturnType.find(','))); + os << indentation << "template "; + } + os << "> " << std::endl; + } } void writeStructConstructor( std::ofstream & ofs, std::string const& name, StructData const& structData, std::set const& vkTypes, std::map const& defaultValues ) @@ -2750,62 +2902,135 @@ void writeTypeCommand(std::ofstream & ofs, VkData const& vkData, DependencyData { assert(vkData.commands.find(dependencyData.name) != vkData.commands.end()); CommandData const& commandData = vkData.commands.find(dependencyData.name)->second; - if (commandData.handle.empty()) + if (commandData.className.empty()) { - writeTypeCommandStandard(ofs, " ", dependencyData.name, dependencyData, commandData, vkData.vkTypes); - - ofs << std::endl - << "#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl; - writeTypeCommandEnhanced(ofs, vkData, " ", "", dependencyData.name, dependencyData, commandData); - ofs << "#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/" << std::endl - << std::endl; + if (commandData.fullName == "createInstance") + { + auto deleterTypesIt = vkData.deleterTypes.find(""); + assert((deleterTypesIt != vkData.deleterTypes.end()) && (deleterTypesIt->second.size() == 1)); + writeDeleterForwardDeclarations(ofs, *deleterTypesIt, vkData.deleterData); + } + writeTypeCommandDeclaration(ofs, " ", vkData, commandData); + if (commandData.fullName == "createInstance") + { + auto deleterTypesIt = vkData.deleterTypes.find(""); + assert((deleterTypesIt != vkData.deleterTypes.end()) && (deleterTypesIt->second.size() == 1)); + writeDeleterClasses(ofs, *deleterTypesIt, vkData.deleterData); + } + writeTypeCommandDefinition(ofs, " ", vkData, commandData, dependencyData); + ofs << std::endl; } } -void writeTypeCommandEnhanced(std::ostream & os, VkData const& vkData, std::string const& indentation, std::string const& className, std::string const& functionName, - DependencyData const& dependencyData, CommandData const& commandData) +void writeTypeCommandDeclaration(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData) { - enterProtect(os, commandData.protect); - std::map vectorParams = getVectorParams(commandData.params); - size_t returnIndex = findReturnIndex(commandData, vectorParams); - size_t templateIndex = findTemplateIndex(commandData.params, vectorParams); - assert((templateIndex == ~0) || (vectorParams.find(templateIndex) != vectorParams.end())); - std::map::const_iterator returnVector = vectorParams.find(returnIndex); - std::string returnType = determineReturnType(commandData, returnIndex, returnVector != vectorParams.end()); - std::set skippedParams = determineSkippedParams(returnIndex, vectorParams); + enterProtect(ofs, commandData.protect); + bool unchangedInterface = !hasPointerParam(commandData.params); + if ((commandData.enhancedReturnType == commandData.returnType) && commandData.vectorParams.empty() && unchangedInterface && (commandData.successCodes.size() <= 1)) + { + writeTypeCommandDeclarationStandard(ofs, " ", vkData, commandData); + } + else + { + if (unchangedInterface) + { + ofs << "#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl; + } + writeTypeCommandDeclarationStandard(ofs, " ", vkData, commandData); + ofs << (unchangedInterface ? "#else" : "#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE") << std::endl; + writeTypeCommandDeclarationEnhanced(ofs, " ", vkData, commandData); + ofs << "#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/" << std::endl; + } + leaveProtect(ofs, commandData.protect); + ofs << std::endl; +} - writeFunctionHeader(os, skippedParams, vkData, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParams, false, false); - writeFunctionBody(os, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkData.vkTypes, returnIndex, vectorParams, false); +void writeTypeCommandDeclarationEnhanced(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData) +{ + writeFunctionDeclaration(ofs, indentation, vkData, commandData, true, false, false); // determine candidates for singular version of function - bool singular = (returnVector != vectorParams.end()) && (returnVector->second != ~0) && (commandData.params[returnVector->second].type.back() != '*'); + std::map::const_iterator returnVector = commandData.vectorParams.find(commandData.returnParam); + bool singular = (returnVector != commandData.vectorParams.end()) && (returnVector->second != ~0) && (commandData.params[returnVector->second].type.back() != '*'); if (singular) { - os << std::endl; - writeFunctionHeader(os, skippedParams, vkData, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParams, true, false); - writeFunctionBody(os, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkData.vkTypes, returnIndex, vectorParams, true); + writeFunctionDeclaration(ofs, indentation, vkData, commandData, true, true, false); } - // special handling for createDevice ! - bool specialWriteUnique = (functionName == "createDevice"); + // special handling for createDevice and createInstance ! + bool specialWriteUnique = (commandData.reducedName == "createDevice") || (commandData.reducedName == "createInstance"); - if (((vkData.deleterTypes.find(className) != vkData.deleterTypes.end()) || specialWriteUnique) && ((functionName.substr(0, 8) == "allocate") || (functionName.substr(0, 6) == "create"))) + if (((vkData.deleterData.find(commandData.className) != vkData.deleterData.end()) || specialWriteUnique) && ((commandData.reducedName.substr(0, 8) == "allocate") || (commandData.reducedName.substr(0, 6) == "create"))) { - os << std::endl - << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; - writeFunctionHeader(os, skippedParams, vkData, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParams, false, true); - writeFunctionBodyUnique(os, indentation, commandData, className, skippedParams, returnIndex, vectorParams, vkData.deleterData, false); + ofs << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; + writeFunctionDeclaration(ofs, indentation, vkData, commandData, true, false, true); if (singular) { - os << std::endl; - writeFunctionHeader(os, skippedParams, vkData, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParams, true, true); - writeFunctionBodyUnique(os, indentation, commandData, className, skippedParams, returnIndex, vectorParams, vkData.deleterData, true); + writeFunctionDeclaration(ofs, indentation, vkData, commandData, true, true, true); } - os << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl; + ofs << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl; + } +} + +void writeTypeCommandDeclarationStandard(std::ofstream & ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData) +{ + writeFunctionDeclaration(ofs, indentation, vkData, commandData, false, false, false); +} + +void writeTypeCommandDefinition(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData) +{ + enterProtect(ofs, commandData.protect); + bool unchangedInterface = !hasPointerParam(commandData.params); + if ((commandData.enhancedReturnType == commandData.returnType) && commandData.vectorParams.empty() && unchangedInterface && (commandData.successCodes.size() <= 1)) + { + writeTypeCommandDefinitionStandard(ofs, indentation, vkData, commandData, dependencyData); + } + else + { + if (unchangedInterface) + { + ofs << "#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl; + } + writeTypeCommandDefinitionStandard(ofs, indentation, vkData, commandData, dependencyData); + ofs << (unchangedInterface ? "#else" : "#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE") << std::endl; + writeTypeCommandDefinitionEnhanced(ofs, indentation, vkData, commandData, dependencyData); + ofs << "#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/" << std::endl; + } + leaveProtect(ofs, commandData.protect); +} + +void writeTypeCommandDefinitionEnhanced(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData) +{ + writeFunctionDefinition(ofs, indentation, vkData, commandData, dependencyData, true, false, false); + + // determine candidates for singular version of function + std::map::const_iterator returnVector = commandData.vectorParams.find(commandData.returnParam); + bool singular = (returnVector != commandData.vectorParams.end()) && (returnVector->second != ~0) && (commandData.params[returnVector->second].type.back() != '*'); + if (singular) + { + writeFunctionDefinition(ofs, indentation, vkData, commandData, dependencyData, true, true, false); } - leaveProtect(os, commandData.protect); + // special handling for createDevice and createInstance ! + bool specialWriteUnique = (commandData.reducedName == "createDevice") || (commandData.reducedName == "createInstance"); + + if (((vkData.deleterData.find(commandData.className) != vkData.deleterData.end()) || specialWriteUnique) && ((commandData.reducedName.substr(0, 8) == "allocate") || (commandData.reducedName.substr(0, 6) == "create"))) + { + ofs << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; + writeFunctionDefinition(ofs, indentation, vkData, commandData, dependencyData, true, false, true); + + if (singular) + { + writeFunctionDefinition(ofs, indentation, vkData, commandData, dependencyData, true, true, true); + } + ofs << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl; + } +} + +void writeTypeCommandDefinitionStandard(std::ofstream &ofs, std::string const& indentation, VkData const& vkData, CommandData const& commandData, DependencyData const& dependencyData) +{ + writeFunctionDefinition(ofs, indentation, vkData, commandData, dependencyData, false, false, false); } void writeTypeCommandParam(std::ostream & os, ParamData const& param, std::set const& vkTypes) @@ -2838,76 +3063,6 @@ void writeTypeCommandParam(std::ostream & os, ParamData const& param, std::set const& vkTypes) -{ - enterProtect(os, commandData.protect); - os << indentation; - if (commandData.handle.empty()) - { - os << "VULKAN_HPP_INLINE "; - } - os << commandData.returnType << " " << functionName << "( "; - bool argEncountered = false; - for (size_t i = commandData.handle.empty() ? 0 : 1; i < commandData.params.size(); i++) - { - if (argEncountered) - { - os << ", "; - } - os << commandData.params[i].type << " " << commandData.params[i].name; - if (!commandData.params[i].arraySize.empty()) - { - os << "[" << commandData.params[i].arraySize << "]"; - } - argEncountered = true; - } - os << " )"; - if (!commandData.handle.empty()) - { - os << " const"; - } - os << std::endl - << indentation << "{" << std::endl - << indentation << " "; - bool castReturn = false; - if (commandData.returnType != "void") - { - os << "return "; - castReturn = (vkTypes.find(commandData.returnType) != vkTypes.end()); - if (castReturn) - { - os << "static_cast<" << commandData.returnType << ">( "; - } - } - - std::string callName(dependencyData.name); - assert(islower(callName[0])); - callName[0] = toupper(callName[0]); - - os << "vk" << callName << "( "; - if (!commandData.handle.empty()) - { - os << "m_" << commandData.params[0].name; - } - argEncountered = false; - for (size_t i = commandData.handle.empty() ? 0 : 1; i < commandData.params.size(); i++) - { - if (0 < i) - { - os << ", "; - } - writeTypeCommandParam(os, commandData.params[i], vkTypes); - } - os << " )"; - if (castReturn) - { - os << " )"; - } - os << ";" << std::endl - << indentation << "}" << std::endl; - leaveProtect(os, commandData.protect); -} - void writeTypeEnum( std::ofstream & ofs, EnumData const& enumData ) { enterProtect(ofs, enumData.protect); @@ -2927,13 +3082,15 @@ void writeTypeEnum( std::ofstream & ofs, EnumData const& enumData ) ofs << std::endl; } -void writeDeleterClasses(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData) +void writeDeleterClasses(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData) { ofs << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; bool first = true; std::string firstName = deleterTypes.first.empty() ? "" : (char(tolower(deleterTypes.first[0])) + deleterTypes.first.substr(1)); for (auto const& dt : deleterTypes.second) { + std::string value = char(tolower(dt[0])) + dt.substr(1); + if (!first) { ofs << std::endl; @@ -2944,9 +3101,9 @@ void writeDeleterClasses(std::ofstream & ofs, std::pairsecond.pool << " " << poolName << " = " << dd->second.pool << "() )" << std::endl; } ofs << " : "; - if (!deleterTypes.first.empty()) + if (!deleterTypes.first.empty() && (dt != "Device")) { ofs << "m_" << firstName << "( " << firstName << " )" << std::endl << " , "; @@ -2977,12 +3134,44 @@ void writeDeleterClasses(std::ofstream & ofs, std::pairsecond.call << "( "; + if (!dd->second.pool.empty()) + { + ofs << "m_" << char(tolower(dd->second.pool[0])) << dd->second.pool.substr(1) << ", "; + } + if (!deleterTypes.first.empty() && (dt != "Device")) + { + ofs << value; + } + if (dd->second.pool.empty()) + { + if (!deleterTypes.first.empty() && (dt != "Device")) + { + ofs << ", "; + } + ofs << "m_allocator"; + } + ofs << " );" << std::endl + << " }" << std::endl << std::endl << " private:" << std::endl; - if (!deleterTypes.first.empty()) + if (!deleterTypes.first.empty() && (dt != "Device")) { - ofs << " " << deleterTypes.first << " const* m_" << firstName << ";" << std::endl; + ofs << " " << deleterTypes.first << " m_" << firstName << ";" << std::endl; } if (poolName.empty()) { @@ -2992,58 +3181,21 @@ void writeDeleterClasses(std::ofstream & ofs, std::pairsecond.pool << " m_" << poolName << ";" << std::endl; } - ofs << " };" << std::endl - << " using Unique" << dt << " = UniqueHandle<" << dt << ", " << dt << "Deleter>;" << std::endl; - } + ofs << " };" << std::endl; + } ofs << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl << std::endl; } -void writeDeleterOperators(std::ofstream & ofs, std::pair> const& deleterTypes, std::map const& deleterData) +void writeDeleterForwardDeclarations(std::ofstream &ofs, std::pair> const& deleterTypes, std::map const& deleterData) { ofs << "#ifndef VULKAN_HPP_NO_SMART_HANDLE" << std::endl; bool first = true; - for (auto dt : deleterTypes.second) + std::string firstName = deleterTypes.first.empty() ? "" : (char(tolower(deleterTypes.first[0])) + deleterTypes.first.substr(1)); + for (auto const& dt : deleterTypes.second) { - if (!first) - { - ofs << std::endl; - } - first = false; - - std::map::const_iterator ddit = deleterData.find(dt); - assert(ddit != deleterData.end()); - - std::string value = char(tolower(dt[0])) + dt.substr(1); - ofs << " VULKAN_HPP_INLINE void " << dt << "Deleter::operator()( " << dt << " " << value << " )" << std::endl - << " {" << std::endl; - if (deleterTypes.first.empty()) - { - ofs << " " << value << "."; - } - else - { - ofs << " m_" << char(tolower(deleterTypes.first[0])) << deleterTypes.first.substr(1) << "->"; - } - ofs << ddit->second.call << "( "; - if (!ddit->second.pool.empty()) - { - ofs << "m_" << char(tolower(ddit->second.pool[0])) << ddit->second.pool.substr(1) << ", "; - } - if (!deleterTypes.first.empty()) - { - ofs << value; - } - if (ddit->second.pool.empty()) - { - if (!deleterTypes.first.empty()) - { - ofs << ", "; - } - ofs << "m_allocator"; - } - ofs << " );" << std::endl - << " }" << std::endl; + ofs << " class " << dt << "Deleter;" << std::endl; + ofs << " using Unique" << dt << " = UniqueHandle<" << dt << ", " << dt << "Deleter>;" << std::endl; } ofs << "#endif /*VULKAN_HPP_NO_SMART_HANDLE*/" << std::endl << std::endl; @@ -3176,8 +3328,9 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c std::map>::const_iterator deleterTypesIt = vkData.deleterTypes.find(dependencyData.name); if (deleterTypesIt != vkData.deleterTypes.end()) { - writeDeleterClasses(ofs, *deleterTypesIt, vkData.deleterData); + writeDeleterForwardDeclarations(ofs, *deleterTypesIt, vkData.deleterData); } + ofs << " class " << dependencyData.name << std::endl << " {" << std::endl << " public:" << std::endl @@ -3218,50 +3371,15 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c << " }" << std::endl << std::endl; - if (!handleData.commands.empty()) + for (size_t i = 0; i < handleData.commands.size(); i++) { - for (size_t i = 0; i < handleData.commands.size(); i++) - { - std::string commandName = handleData.commands[i]; - std::map::const_iterator cit = vkData.commands.find(commandName); - assert((cit != vkData.commands.end()) && !cit->second.handle.empty()); - std::list::const_iterator dep = std::find_if(dependencies.begin(), dependencies.end(), [commandName](DependencyData const& dd) { return dd.name == commandName; }); - assert(dep != dependencies.end() && (dep->name == cit->second.fullName)); - std::string className = dependencyData.name; + std::string commandName = handleData.commands[i]; + std::map::const_iterator cit = vkData.commands.find(commandName); + assert((cit != vkData.commands.end()) && !cit->second.className.empty()); - std::ostringstream standard, enhanced; - writeTypeCommandStandard(standard, " ", cit->second.reducedName, *dep, cit->second, vkData.vkTypes); - writeTypeCommandEnhanced(enhanced, vkData, " ", className, cit->second.reducedName, *dep, cit->second); - if (standard.str().substr(standard.str().find('{')) == enhanced.str().substr(enhanced.str().find('{'))) - { - ofs << standard.str() << std::endl; - } - else - { - bool unchangedInterface = !hasPointerParam(cit->second.params); - if (unchangedInterface) - { - ofs << "#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl; - } - ofs << standard.str(); - if (unchangedInterface) - { - ofs << "#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/" << std::endl; - } - - ofs << std::endl - << "#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl - << enhanced.str() - << "#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/" << std::endl; - } - - if (i < handleData.commands.size() - 1) - { - ofs << std::endl; - } - } - ofs << std::endl; + writeTypeCommandDeclaration(ofs, " ", vkData, cit->second); } + ofs << "#if !defined(VULKAN_HPP_TYPESAFE_CONVERSION)" << std::endl << " explicit" << std::endl << "#endif" << std::endl @@ -3287,10 +3405,29 @@ void writeTypeHandle(std::ofstream & ofs, VkData const& vkData, DependencyData c << " static_assert( sizeof( " << dependencyData.name << " ) == sizeof( Vk" << dependencyData.name << " ), \"handle and wrapper have different size!\" );" << std::endl #endif << std::endl; + + deleterTypesIt = vkData.deleterTypes.find(dependencyData.name); if (deleterTypesIt != vkData.deleterTypes.end()) { - writeDeleterOperators(ofs, *deleterTypesIt, vkData.deleterData); + writeDeleterClasses(ofs, *deleterTypesIt, vkData.deleterData); } + + for (size_t i = 0; i < handleData.commands.size(); i++) + { + std::string commandName = handleData.commands[i]; + std::map::const_iterator cit = vkData.commands.find(commandName); + assert((cit != vkData.commands.end()) && !cit->second.className.empty()); + std::list::const_iterator dep = std::find_if(dependencies.begin(), dependencies.end(), [commandName](DependencyData const& dd) { return dd.name == commandName; }); + assert(dep != dependencies.end() && (dep->name == cit->second.fullName)); + + writeTypeCommandDefinition(ofs, " ", vkData, cit->second, *dep); + + if (i < handleData.commands.size() - 1) + { + ofs << std::endl; + } + } + leaveProtect(ofs, handleData.protect); } @@ -3595,6 +3732,7 @@ int main( int argc, char **argv ) assert(!registryElement->NextSiblingElement()); VkData vkData; + vkData.handles[""]; // insert the default "handle" without class (for createInstance, and such) tinyxml2::XMLElement * child = registryElement->FirstChildElement(); do @@ -3695,9 +3833,7 @@ int main( int argc, char **argv ) << createResultValueHeader; assert(vkData.deleterTypes.find("") != vkData.deleterTypes.end()); - writeDeleterClasses(ofs, *vkData.deleterTypes.find(""), vkData.deleterData); writeTypes(ofs, vkData, defaultValues); - writeDeleterOperators(ofs, *vkData.deleterTypes.find(""), vkData.deleterData); writeEnumsToString(ofs, vkData); ofs << "} // namespace vk" << std::endl diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 7877425..f655d07 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -325,10 +325,6 @@ namespace vk #endif #ifndef VULKAN_HPP_NO_SMART_HANDLE - class Device; - class Instance; - struct AllocationCallbacks; - template class UniqueHandle { @@ -626,36 +622,6 @@ namespace vk return ResultValue( result, data ); } -#ifndef VULKAN_HPP_NO_SMART_HANDLE - class DeviceDeleter - { - public: - DeviceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - void operator()( Device device ); - - private: - Optional m_allocator; - }; - using UniqueDevice = UniqueHandle; - - class InstanceDeleter - { - public: - InstanceDeleter( Optional allocator = nullptr ) - : m_allocator( allocator ) - {} - - void operator()( Instance instance ); - - private: - Optional m_allocator; - }; - using UniqueInstance = UniqueHandle; -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - using SampleMask = uint32_t; using Bool32 = uint32_t; @@ -17249,14 +17215,19 @@ namespace vk }; static_assert( sizeof( DisplayEventInfoEXT ) == sizeof( VkDisplayEventInfoEXT ), "struct and wrapper have different size!" ); + Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateInstanceLayerProperties(); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) { return static_cast( vkEnumerateInstanceLayerProperties( pPropertyCount, reinterpret_cast( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceLayerProperties() + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceLayerProperties() { std::vector properties; uint32_t propertyCount; @@ -17276,14 +17247,19 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr ); +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result enumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) { return static_cast( vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName = nullptr ) + template + VULKAN_HPP_INLINE typename ResultValueType>::type enumerateInstanceExtensionProperties( Optional layerName ) { std::vector properties; uint32_t propertyCount; @@ -17340,505 +17316,194 @@ namespace vk return m_commandBuffer < rhs.m_commandBuffer; } - Result begin( const CommandBufferBeginInfo* pBeginInfo ) const - { - return static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); - } - + Result begin( const CommandBufferBeginInfo* pBeginInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo ) const - { - Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); - return createResultValue( result, "vk::CommandBuffer::begin" ); - } + ResultValueType::type begin( const CommandBufferBeginInfo & beginInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result end( ) const - { - return static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type end() const - { - Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - return createResultValue( result, "vk::CommandBuffer::end" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result reset( CommandBufferResetFlags flags ) const - { - return static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type reset( CommandBufferResetFlags flags ) const - { - Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - return createResultValue( result, "vk::CommandBuffer::reset" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const - { - vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); - } - - - void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const - { - vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const - { - vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void setLineWidth( float lineWidth ) const - { - vkCmdSetLineWidth( m_commandBuffer, lineWidth ); - } - - - void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const - { - vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); - } - - - void setBlendConstants( const float blendConstants[4] ) const - { - vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); - } - - - void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const - { - vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); - } - - - void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const - { - vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); - } - - - void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const - { - vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); - } - - - void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const - { - vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); - } - - - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const - { - vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const - { - vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); - } - - - void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const - { - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( buffers.size() == offsets.size() ); + Result end() const; #else - if ( buffers.size() != offsets.size() ) - { - throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); - } + ResultValueType::type end() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const - { - vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); - } +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + Result reset( CommandBufferResetFlags flags ) const; +#else + ResultValueType::type reset( CommandBufferResetFlags flags ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const; - void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const - { - vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); - } - - - void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } - - - void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); - } - - - void dispatch( uint32_t x, uint32_t y, uint32_t z ) const - { - vkCmdDispatch( m_commandBuffer, x, y, z ); - } - - - void dispatchIndirect( Buffer buffer, DeviceSize offset ) const - { - vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); - } - - - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); - } - + void setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const - { - vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); - } + void setViewport( uint32_t firstViewport, ArrayProxy viewports ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const - { - vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); - } - + void setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - 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 ), regions.size() , reinterpret_cast( regions.data() ) ); - } + void setScissor( uint32_t firstScissor, ArrayProxy scissors ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const - { - vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); - } + void setLineWidth( float lineWidth ) const; + void setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const; + + void setBlendConstants( const float blendConstants[4] ) const; + + void setDepthBounds( float minDepthBounds, float maxDepthBounds ) const; + + void setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const; + + void setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const; + + void setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const; + + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - 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 ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); - } + void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); - } + void bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const; + void bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const - { - vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); - } + void bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); - } + void draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const; + void drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const; + + void drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + + void drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const; + + void dispatch( uint32_t x, uint32_t y, uint32_t z ) const; + + void dispatchIndirect( Buffer buffer, DeviceSize offset ) const; + + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const - { - vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); - } + void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); - } + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions, Filter filter ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const - { - vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); - } + void updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const - { - vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); - } - - - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); - } + void fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const; + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const - { - vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); - } + void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); - } - + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const - { - vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); - } + void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); - } - + void clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const - { - vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); - } + void clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const - { - vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); - } - + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - 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 ), regions.size() , reinterpret_cast( regions.data() ) ); - } + void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void setEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } + void setEvent( Event event, PipelineStageFlags stageMask ) const; + void resetEvent( Event event, PipelineStageFlags stageMask ) const; - void resetEvent( Event event, PipelineStageFlags stageMask ) const - { - vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); - } - - - void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const - { - vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); - } - + void waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const - { - 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() ) ); - } + void waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const - { - vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); - } - + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - 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 ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); - } + void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const - { - vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); - } + void beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const; + void endQuery( QueryPool queryPool, uint32_t query ) const; - void endQuery( QueryPool queryPool, uint32_t query ) const - { - vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); - } + void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const; + void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const; - void resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const - { - vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); - } - - - void writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const - { - vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); - } - - - void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const - { - vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); - } - - - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); - } + void copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const; + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const - { - vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); - } + void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); - } - + void beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const - { - vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); - } + void beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void nextSubpass( SubpassContents contents ) const - { - vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); - } + void nextSubpass( SubpassContents contents ) const; + void endRenderPass() const; - void endRenderPass( ) const - { - vkCmdEndRenderPass( m_commandBuffer ); - } - - - void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - + void executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void executeCommands( ArrayProxy commandBuffers ) const - { - vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); - } + void executeCommands( ArrayProxy commandBuffers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } - + void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; - } + DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerEndEXT( ) const - { - vkCmdDebugMarkerEndEXT( m_commandBuffer ); - } - - - void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const - { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); - } + void debugMarkerEndEXT() const; + void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const - { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; - } + DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } + void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; + void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; - void drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const - { - vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); - } - - - void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); - } - + void processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const - { - vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); - } + void processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); - } - + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const - { - vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); - } + void reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -17864,6 +17529,450 @@ namespace vk }; static_assert( sizeof( CommandBuffer ) == sizeof( VkCommandBuffer ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result CommandBuffer::begin( const CommandBufferBeginInfo* pBeginInfo ) const + { + return static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( pBeginInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo ) const + { + Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); + return createResultValue( result, "vk::CommandBuffer::begin" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result CommandBuffer::end() const + { + return static_cast( vkEndCommandBuffer( m_commandBuffer ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::end() const + { + Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); + return createResultValue( result, "vk::CommandBuffer::end" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + return static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::reset( CommandBufferResetFlags flags ) const + { + Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); + return createResultValue( result, "vk::CommandBuffer::reset" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::bindPipeline( PipelineBindPoint pipelineBindPoint, Pipeline pipeline ) const + { + vkCmdBindPipeline( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( pipeline ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, uint32_t viewportCount, const Viewport* pViewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewportCount, reinterpret_cast( pViewports ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::setViewport( uint32_t firstViewport, ArrayProxy viewports ) const + { + vkCmdSetViewport( m_commandBuffer, firstViewport, viewports.size() , reinterpret_cast( viewports.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, uint32_t scissorCount, const Rect2D* pScissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissorCount, reinterpret_cast( pScissors ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::setScissor( uint32_t firstScissor, ArrayProxy scissors ) const + { + vkCmdSetScissor( m_commandBuffer, firstScissor, scissors.size() , reinterpret_cast( scissors.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::setLineWidth( float lineWidth ) const + { + vkCmdSetLineWidth( m_commandBuffer, lineWidth ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setDepthBias( float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) const + { + vkCmdSetDepthBias( m_commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setBlendConstants( const float blendConstants[4] ) const + { + vkCmdSetBlendConstants( m_commandBuffer, blendConstants ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setDepthBounds( float minDepthBounds, float maxDepthBounds ) const + { + vkCmdSetDepthBounds( m_commandBuffer, minDepthBounds, maxDepthBounds ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilCompareMask( StencilFaceFlags faceMask, uint32_t compareMask ) const + { + vkCmdSetStencilCompareMask( m_commandBuffer, static_cast( faceMask ), compareMask ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilWriteMask( StencilFaceFlags faceMask, uint32_t writeMask ) const + { + vkCmdSetStencilWriteMask( m_commandBuffer, static_cast( faceMask ), writeMask ); + } + + VULKAN_HPP_INLINE void CommandBuffer::setStencilReference( StencilFaceFlags faceMask, uint32_t reference ) const + { + vkCmdSetStencilReference( m_commandBuffer, static_cast( faceMask ), reference ); + } + + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets ) const + { + vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSetCount, reinterpret_cast( pDescriptorSets ), dynamicOffsetCount, pDynamicOffsets ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, ArrayProxy descriptorSets, ArrayProxy dynamicOffsets ) const + { + vkCmdBindDescriptorSets( m_commandBuffer, static_cast( pipelineBindPoint ), static_cast( layout ), firstSet, descriptorSets.size() , reinterpret_cast( descriptorSets.data() ), dynamicOffsets.size() , dynamicOffsets.data() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::bindIndexBuffer( Buffer buffer, DeviceSize offset, IndexType indexType ) const + { + vkCmdBindIndexBuffer( m_commandBuffer, static_cast( buffer ), offset, static_cast( indexType ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, uint32_t bindingCount, const Buffer* pBuffers, const DeviceSize* pOffsets ) const + { + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, bindingCount, reinterpret_cast( pBuffers ), pOffsets ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::bindVertexBuffers( uint32_t firstBinding, ArrayProxy buffers, ArrayProxy offsets ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( buffers.size() == offsets.size() ); +#else + if ( buffers.size() != offsets.size() ) + { + throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::draw( uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance ) const + { + vkCmdDraw( m_commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndexed( uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance ) const + { + vkCmdDrawIndexed( m_commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirect( Buffer buffer, DeviceSize offset, uint32_t drawCount, uint32_t stride ) const + { + vkCmdDrawIndexedIndirect( m_commandBuffer, static_cast( buffer ), offset, drawCount, stride ); + } + + VULKAN_HPP_INLINE void CommandBuffer::dispatch( uint32_t x, uint32_t y, uint32_t z ) const + { + vkCmdDispatch( m_commandBuffer, x, y, z ); + } + + VULKAN_HPP_INLINE void CommandBuffer::dispatchIndirect( Buffer buffer, DeviceSize offset ) const + { + vkCmdDispatchIndirect( m_commandBuffer, static_cast( buffer ), offset ); + } + + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, uint32_t regionCount, const BufferCopy* pRegions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::copyBuffer( Buffer srcBuffer, Buffer dstBuffer, ArrayProxy regions ) const + { + vkCmdCopyBuffer( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageCopy* pRegions ) const + { + vkCmdCopyImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::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 ), regions.size() , reinterpret_cast( regions.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageBlit* pRegions, Filter filter ) const + { + vkCmdBlitImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ), static_cast( filter ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::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 ), regions.size() , reinterpret_cast( regions.data() ), static_cast( filter ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const BufferImageCopy* pRegions ) const + { + vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, ArrayProxy regions ) const + { + vkCmdCopyBufferToImage( m_commandBuffer, static_cast( srcBuffer ), static_cast( dstImage ), static_cast( dstImageLayout ), regions.size() , reinterpret_cast( regions.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, uint32_t regionCount, const BufferImageCopy* pRegions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regionCount, reinterpret_cast( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, ArrayProxy regions ) const + { + vkCmdCopyImageToBuffer( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstBuffer ), regions.size() , reinterpret_cast( regions.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize dataSize, const void* pData ) const + { + vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, dataSize, pData ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::updateBuffer( Buffer dstBuffer, DeviceSize dstOffset, ArrayProxy data ) const + { + vkCmdUpdateBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, data.size() * sizeof( T ) , reinterpret_cast( data.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::fillBuffer( Buffer dstBuffer, DeviceSize dstOffset, DeviceSize size, uint32_t data ) const + { + vkCmdFillBuffer( m_commandBuffer, static_cast( dstBuffer ), dstOffset, size, data ); + } + + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue* pColor, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + { + vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pColor ), rangeCount, reinterpret_cast( pRanges ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ArrayProxy ranges ) const + { + vkCmdClearColorImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &color ), ranges.size() , reinterpret_cast( ranges.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const ImageSubresourceRange* pRanges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( pDepthStencil ), rangeCount, reinterpret_cast( pRanges ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ArrayProxy ranges ) const + { + vkCmdClearDepthStencilImage( m_commandBuffer, static_cast( image ), static_cast( imageLayout ), reinterpret_cast( &depthStencil ), ranges.size() , reinterpret_cast( ranges.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( uint32_t attachmentCount, const ClearAttachment* pAttachments, uint32_t rectCount, const ClearRect* pRects ) const + { + vkCmdClearAttachments( m_commandBuffer, attachmentCount, reinterpret_cast( pAttachments ), rectCount, reinterpret_cast( pRects ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::clearAttachments( ArrayProxy attachments, ArrayProxy rects ) const + { + vkCmdClearAttachments( m_commandBuffer, attachments.size() , reinterpret_cast( attachments.data() ), rects.size() , reinterpret_cast( rects.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, uint32_t regionCount, const ImageResolve* pRegions ) const + { + vkCmdResolveImage( m_commandBuffer, static_cast( srcImage ), static_cast( srcImageLayout ), static_cast( dstImage ), static_cast( dstImageLayout ), regionCount, reinterpret_cast( pRegions ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::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 ), regions.size() , reinterpret_cast( regions.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::setEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdSetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::resetEvent( Event event, PipelineStageFlags stageMask ) const + { + vkCmdResetEvent( m_commandBuffer, static_cast( event ), static_cast( stageMask ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( uint32_t eventCount, const Event* pEvents, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + { + vkCmdWaitEvents( m_commandBuffer, eventCount, reinterpret_cast( pEvents ), static_cast( srcStageMask ), static_cast( dstStageMask ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::waitEvents( ArrayProxy events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, ArrayProxy memoryBarriers, ArrayProxy bufferMemoryBarriers, ArrayProxy imageMemoryBarriers ) const + { + 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 /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const MemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const BufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const ImageMemoryBarrier* pImageMemoryBarriers ) const + { + vkCmdPipelineBarrier( m_commandBuffer, static_cast( srcStageMask ), static_cast( dstStageMask ), static_cast( dependencyFlags ), memoryBarrierCount, reinterpret_cast( pMemoryBarriers ), bufferMemoryBarrierCount, reinterpret_cast( pBufferMemoryBarriers ), imageMemoryBarrierCount, reinterpret_cast( pImageMemoryBarriers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::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 ), memoryBarriers.size() , reinterpret_cast( memoryBarriers.data() ), bufferMemoryBarriers.size() , reinterpret_cast( bufferMemoryBarriers.data() ), imageMemoryBarriers.size() , reinterpret_cast( imageMemoryBarriers.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::beginQuery( QueryPool queryPool, uint32_t query, QueryControlFlags flags ) const + { + vkCmdBeginQuery( m_commandBuffer, static_cast( queryPool ), query, static_cast( flags ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::endQuery( QueryPool queryPool, uint32_t query ) const + { + vkCmdEndQuery( m_commandBuffer, static_cast( queryPool ), query ); + } + + VULKAN_HPP_INLINE void CommandBuffer::resetQueryPool( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount ) const + { + vkCmdResetQueryPool( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount ); + } + + VULKAN_HPP_INLINE void CommandBuffer::writeTimestamp( PipelineStageFlagBits pipelineStage, QueryPool queryPool, uint32_t query ) const + { + vkCmdWriteTimestamp( m_commandBuffer, static_cast( pipelineStage ), static_cast( queryPool ), query ); + } + + VULKAN_HPP_INLINE void CommandBuffer::copyQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags ) const + { + vkCmdCopyQueryPoolResults( m_commandBuffer, static_cast( queryPool ), firstQuery, queryCount, static_cast( dstBuffer ), dstOffset, stride, static_cast( flags ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues ) const + { + vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, size, pValues ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE void CommandBuffer::pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, ArrayProxy values ) const + { + vkCmdPushConstants( m_commandBuffer, static_cast( layout ), static_cast( stageFlags ), offset, values.size() * sizeof( T ) , reinterpret_cast( values.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo* pRenderPassBegin, SubpassContents contents ) const + { + vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( pRenderPassBegin ), static_cast( contents ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::beginRenderPass( const RenderPassBeginInfo & renderPassBegin, SubpassContents contents ) const + { + vkCmdBeginRenderPass( m_commandBuffer, reinterpret_cast( &renderPassBegin ), static_cast( contents ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::nextSubpass( SubpassContents contents ) const + { + vkCmdNextSubpass( m_commandBuffer, static_cast( contents ) ); + } + + VULKAN_HPP_INLINE void CommandBuffer::endRenderPass() const + { + vkCmdEndRenderPass( m_commandBuffer ); + } + + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + { + vkCmdExecuteCommands( m_commandBuffer, commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::executeCommands( ArrayProxy commandBuffers ) const + { + vkCmdExecuteCommands( m_commandBuffer, commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerBeginEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + return markerInfo; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerEndEXT() const + { + vkCmdDebugMarkerEndEXT( m_commandBuffer ); + } + + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + { + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerInsertEXT() const + { + DebugMarkerMarkerInfoEXT markerInfo; + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); + return markerInfo; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + vkCmdDrawIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } + + VULKAN_HPP_INLINE void CommandBuffer::drawIndexedIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const + { + vkCmdDrawIndexedIndirectCountAMD( m_commandBuffer, static_cast( buffer ), offset, static_cast( countBuffer ), countBufferOffset, maxDrawCount, stride ); + } + + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX* pProcessCommandsInfo ) const + { + vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( pProcessCommandsInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::processCommandsNVX( const CmdProcessCommandsInfoNVX & processCommandsInfo ) const + { + vkCmdProcessCommandsNVX( m_commandBuffer, reinterpret_cast( &processCommandsInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( pReserveSpaceInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::reserveSpaceForCommandsNVX( const CmdReserveSpaceForCommandsInfoNVX & reserveSpaceInfo ) const + { + vkCmdReserveSpaceForCommandsNVX( m_commandBuffer, reinterpret_cast( &reserveSpaceInfo ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct SubmitInfo { SubmitInfo( uint32_t waitSemaphoreCount_ = 0, const Semaphore* pWaitSemaphores_ = nullptr, const PipelineStageFlags* pWaitDstStageMask_ = nullptr, uint32_t commandBufferCount_ = 0, const CommandBuffer* pCommandBuffers_ = nullptr, uint32_t signalSemaphoreCount_ = 0, const Semaphore* pSignalSemaphores_ = nullptr ) @@ -18010,58 +18119,25 @@ namespace vk return m_queue < rhs.m_queue; } - Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const - { - return static_cast( vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); - } - + Result submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type submit( ArrayProxy submits, Fence fence ) const - { - Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::submit" ); - } + ResultValueType::type submit( ArrayProxy submits, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast( vkQueueWaitIdle( m_queue ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type waitIdle() const - { - Result result = static_cast( vkQueueWaitIdle( m_queue ) ); - return createResultValue( result, "vk::Queue::waitIdle" ); - } + Result waitIdle() const; +#else + ResultValueType::type waitIdle() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const - { - return static_cast( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); - } - + Result bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence ) const - { - Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::bindSparse" ); - } + ResultValueType::type bindSparse( ArrayProxy bindInfo, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result presentKHR( const PresentInfoKHR* pPresentInfo ) const - { - return static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); - } - + Result presentKHR( const PresentInfoKHR* pPresentInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result presentKHR( const PresentInfoKHR & presentInfo ) const - { - Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); - return createResultValue( result, "vk::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); - } + Result presentKHR( const PresentInfoKHR & presentInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -18087,389 +18163,102 @@ namespace vk }; static_assert( sizeof( Queue ) == sizeof( VkQueue ), "handle and wrapper have different size!" ); + VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const SubmitInfo* pSubmits, Fence fence ) const + { + return static_cast( vkQueueSubmit( m_queue, submitCount, reinterpret_cast( pSubmits ), static_cast( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Queue::submit( ArrayProxy submits, Fence fence ) const + { + Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); + return createResultValue( result, "vk::Queue::submit" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Queue::waitIdle() const + { + return static_cast( vkQueueWaitIdle( m_queue ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Queue::waitIdle() const + { + Result result = static_cast( vkQueueWaitIdle( m_queue ) ); + return createResultValue( result, "vk::Queue::waitIdle" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Queue::bindSparse( uint32_t bindInfoCount, const BindSparseInfo* pBindInfo, Fence fence ) const + { + return static_cast( vkQueueBindSparse( m_queue, bindInfoCount, reinterpret_cast( pBindInfo ), static_cast( fence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Queue::bindSparse( ArrayProxy bindInfo, Fence fence ) const + { + Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); + return createResultValue( result, "vk::Queue::bindSparse" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR* pPresentInfo ) const + { + return static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( pPresentInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo ) const + { + Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); + return createResultValue( result, "vk::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE - class BufferDeleter - { - public: - BufferDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Buffer buffer ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class BufferDeleter; using UniqueBuffer = UniqueHandle; - - class BufferViewDeleter - { - public: - BufferViewDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( BufferView bufferView ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class BufferViewDeleter; using UniqueBufferView = UniqueHandle; - - class CommandBufferDeleter - { - public: - CommandBufferDeleter( Device const* device = nullptr, CommandPool commandPool = CommandPool() ) - : m_device( device ) - , m_commandPool( commandPool ) - {} - - void operator()( CommandBuffer commandBuffer ); - - private: - Device const* m_device; - CommandPool m_commandPool; - }; + class CommandBufferDeleter; using UniqueCommandBuffer = UniqueHandle; - - class CommandPoolDeleter - { - public: - CommandPoolDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( CommandPool commandPool ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class CommandPoolDeleter; using UniqueCommandPool = UniqueHandle; - - class DescriptorPoolDeleter - { - public: - DescriptorPoolDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DescriptorPool descriptorPool ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class DescriptorPoolDeleter; using UniqueDescriptorPool = UniqueHandle; - - class DescriptorSetDeleter - { - public: - DescriptorSetDeleter( Device const* device = nullptr, DescriptorPool descriptorPool = DescriptorPool() ) - : m_device( device ) - , m_descriptorPool( descriptorPool ) - {} - - void operator()( DescriptorSet descriptorSet ); - - private: - Device const* m_device; - DescriptorPool m_descriptorPool; - }; + class DescriptorSetDeleter; using UniqueDescriptorSet = UniqueHandle; - - class DescriptorSetLayoutDeleter - { - public: - DescriptorSetLayoutDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DescriptorSetLayout descriptorSetLayout ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class DescriptorSetLayoutDeleter; using UniqueDescriptorSetLayout = UniqueHandle; - - class DeviceMemoryDeleter - { - public: - DeviceMemoryDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( DeviceMemory deviceMemory ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class DeviceMemoryDeleter; using UniqueDeviceMemory = UniqueHandle; - - class EventDeleter - { - public: - EventDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Event event ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class EventDeleter; using UniqueEvent = UniqueHandle; - - class FenceDeleter - { - public: - FenceDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Fence fence ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class FenceDeleter; using UniqueFence = UniqueHandle; - - class FramebufferDeleter - { - public: - FramebufferDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Framebuffer framebuffer ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class FramebufferDeleter; using UniqueFramebuffer = UniqueHandle; - - class ImageDeleter - { - public: - ImageDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Image image ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class ImageDeleter; using UniqueImage = UniqueHandle; - - class ImageViewDeleter - { - public: - ImageViewDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( ImageView imageView ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class ImageViewDeleter; using UniqueImageView = UniqueHandle; - - class IndirectCommandsLayoutNVXDeleter - { - public: - IndirectCommandsLayoutNVXDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class IndirectCommandsLayoutNVXDeleter; using UniqueIndirectCommandsLayoutNVX = UniqueHandle; - - class ObjectTableNVXDeleter - { - public: - ObjectTableNVXDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( ObjectTableNVX objectTableNVX ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class ObjectTableNVXDeleter; using UniqueObjectTableNVX = UniqueHandle; - - class PipelineDeleter - { - public: - PipelineDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Pipeline pipeline ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class PipelineDeleter; using UniquePipeline = UniqueHandle; - - class PipelineCacheDeleter - { - public: - PipelineCacheDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( PipelineCache pipelineCache ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class PipelineCacheDeleter; using UniquePipelineCache = UniqueHandle; - - class PipelineLayoutDeleter - { - public: - PipelineLayoutDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( PipelineLayout pipelineLayout ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class PipelineLayoutDeleter; using UniquePipelineLayout = UniqueHandle; - - class QueryPoolDeleter - { - public: - QueryPoolDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( QueryPool queryPool ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class QueryPoolDeleter; using UniqueQueryPool = UniqueHandle; - - class RenderPassDeleter - { - public: - RenderPassDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( RenderPass renderPass ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class RenderPassDeleter; using UniqueRenderPass = UniqueHandle; - - class SamplerDeleter - { - public: - SamplerDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Sampler sampler ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class SamplerDeleter; using UniqueSampler = UniqueHandle; - - class SemaphoreDeleter - { - public: - SemaphoreDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( Semaphore semaphore ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class SemaphoreDeleter; using UniqueSemaphore = UniqueHandle; - - class ShaderModuleDeleter - { - public: - ShaderModuleDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( ShaderModule shaderModule ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class ShaderModuleDeleter; using UniqueShaderModule = UniqueHandle; - - class SwapchainKHRDeleter - { - public: - SwapchainKHRDeleter( Device const* device = nullptr, Optional allocator = nullptr ) - : m_device( device ) - , m_allocator( allocator ) - {} - - void operator()( SwapchainKHR swapchainKHR ); - - private: - Device const* m_device; - Optional m_allocator; - }; + class SwapchainKHRDeleter; using UniqueSwapchainKHR = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -18507,1538 +18296,557 @@ namespace vk return m_device < rhs.m_device; } - PFN_vkVoidFunction getProcAddr( const char* pName ) const - { - return vkGetDeviceProcAddr( m_device, pName ); - } - + PFN_vkVoidFunction getProcAddr( const char* pName ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const - { - return vkGetDeviceProcAddr( m_device, name.c_str() ); - } + PFN_vkVoidFunction getProcAddr( const std::string & name ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroy( const AllocationCallbacks* pAllocator ) const - { - vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); - } - + void destroy( const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const - { - vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator)) ); - } + void destroy( Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const - { - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); - } - + void getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const - { - Queue queue; - vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); - return queue; - } + Queue getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitIdle( ) const - { - return static_cast( vkDeviceWaitIdle( m_device ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type waitIdle() const - { - Result result = static_cast( vkDeviceWaitIdle( m_device ) ); - return createResultValue( result, "vk::Device::waitIdle" ); - } + Result waitIdle() const; +#else + ResultValueType::type waitIdle() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const - { - return static_cast( vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); - } - + Result allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, memory, "vk::Device::allocateMemory" ); - } - + ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const - { - DeviceMemoryDeleter deleter( this, allocator ); - return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); - } + UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const - { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); - } - + void freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const - { - vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator)) ); - } + void freeMemory( DeviceMemory memory, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const - { - return static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); - } - + Result mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const - { - void* pData; - Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); - return createResultValue( result, pData, "vk::Device::mapMemory" ); - } + ResultValueType::type mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags = MemoryMapFlags() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void unmapMemory( DeviceMemory memory ) const - { - vkUnmapMemory( m_device, static_cast( memory ) ); - } - - - Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } + void unmapMemory( DeviceMemory memory ) const; + Result flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges ) const - { - Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); - } + ResultValueType::type flushMappedMemoryRanges( ArrayProxy memoryRanges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const - { - return static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); - } - + Result invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const - { - Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); - } + ResultValueType::type invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const - { - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); - } - + void getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DeviceSize getMemoryCommitment( DeviceMemory memory ) const - { - DeviceSize committedMemoryInBytes; - vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); - return committedMemoryInBytes; - } + DeviceSize getMemoryCommitment( DeviceMemory memory ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const - { - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); - } - + void getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const - { - MemoryRequirements memoryRequirements; - vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); - return memoryRequirements; - } + MemoryRequirements getBufferMemoryRequirements( Buffer buffer ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const - { - return static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindBufferMemory" ); - } + Result bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType::type bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const - { - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); - } - + void getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - MemoryRequirements getImageMemoryRequirements( Image image ) const - { - MemoryRequirements memoryRequirements; - vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); - return memoryRequirements; - } + MemoryRequirements getImageMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - return static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const - { - Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindImageMemory" ); - } + Result bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; +#else + ResultValueType::type bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const - { - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); - } - + void getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getImageSparseMemoryRequirements( Image image ) const - { - std::vector sparseMemoryRequirements; - uint32_t sparseMemoryRequirementCount; - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); - sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); - vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); - return sparseMemoryRequirements; - } + template > + std::vector getImageSparseMemoryRequirements( Image image ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - + Result createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, fence, "vk::Device::createFence" ); - } - + ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const - { - FenceDeleter deleter( this, allocator ); - return UniqueFence( createFence( createInfo, allocator ), deleter ); - } + UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const - { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); - } - + void destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFence( Fence fence, Optional allocator = nullptr ) const - { - vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyFence( Fence fence, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result resetFences( uint32_t fenceCount, const Fence* pFences ) const - { - return static_cast( vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); - } - + Result resetFences( uint32_t fenceCount, const Fence* pFences ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetFences( ArrayProxy fences ) const - { - Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); - return createResultValue( result, "vk::Device::resetFences" ); - } + ResultValueType::type resetFences( ArrayProxy fences ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getFenceStatus( Fence fence ) const - { - return static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getFenceStatus( Fence fence ) const - { - Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); - } + Result getFenceStatus( Fence fence ) const; +#else + Result getFenceStatus( Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const - { - return static_cast( vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); - } - + Result waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const - { - Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); - return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); - } + Result waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const - { - return static_cast( vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); - } - + Result createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); - } - + ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const - { - SemaphoreDeleter deleter( this, allocator ); - return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); - } + UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const - { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); - } - + void destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const - { - vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator)) ); - } + void destroySemaphore( Semaphore semaphore, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const - { - return static_cast( vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); - } - + Result createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, event, "vk::Device::createEvent" ); - } - + ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const - { - EventDeleter deleter( this, allocator ); - return UniqueEvent( createEvent( createInfo, allocator ), deleter ); - } + UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const - { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); - } - + void destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyEvent( Event event, Optional allocator = nullptr ) const - { - vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyEvent( Event event, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getEventStatus( Event event ) const - { - return static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result getEventStatus( Event event ) const - { - Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); - } + Result getEventStatus( Event event ) const; +#else + Result getEventStatus( Event event ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result setEvent( Event event ) const - { - return static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type setEvent( Event event ) const - { - Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::setEvent" ); - } + Result setEvent( Event event ) const; +#else + ResultValueType::type setEvent( Event event ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetEvent( Event event ) const - { - return static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetEvent( Event event ) const - { - Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::resetEvent" ); - } + Result resetEvent( Event event ) const; +#else + ResultValueType::type resetEvent( Event event ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const - { - return static_cast( vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); - } - + Result createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); - } - + ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const - { - QueryPoolDeleter deleter( this, allocator ); - return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); - } + UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); - } - + void destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const - { - vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyQueryPool( QueryPool queryPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const - { - return static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); - } - + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template - 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, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); - } + Result getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const - { - return static_cast( vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); - } - + Result createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, buffer, "vk::Device::createBuffer" ); - } - + ResultValueType::type createBuffer( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const - { - BufferDeleter deleter( this, allocator ); - return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); - } + UniqueBuffer createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); - } - + void destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const - { - vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyBuffer( Buffer buffer, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const - { - return static_cast( vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); - } - + Result createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, view, "vk::Device::createBufferView" ); - } - + ResultValueType::type createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const - { - BufferViewDeleter deleter( this, allocator ); - return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); - } + UniqueBufferView createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const - { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); - } - + void destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const - { - vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyBufferView( BufferView bufferView, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const - { - return static_cast( vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); - } - + Result createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, image, "vk::Device::createImage" ); - } - + ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const - { - ImageDeleter deleter( this, allocator ); - return UniqueImage( createImage( createInfo, allocator ), deleter ); - } + UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const - { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); - } - + void destroyImage( Image image, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImage( Image image, Optional allocator = nullptr ) const - { - vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyImage( Image image, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const - { - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); - } - + void getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const - { - SubresourceLayout layout; - vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); - return layout; - } + SubresourceLayout getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const - { - return static_cast( vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); - } - + Result createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, view, "vk::Device::createImageView" ); - } - + ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const - { - ImageViewDeleter deleter( this, allocator ); - return UniqueImageView( createImageView( createInfo, allocator ), deleter ); - } + UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const - { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); - } - + void destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const - { - vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyImageView( ImageView imageView, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const - { - return static_cast( vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); - } - + Result createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); - } - + ResultValueType::type createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const - { - ShaderModuleDeleter deleter( this, allocator ); - return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); - } + UniqueShaderModule createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const - { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); - } - + void destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const - { - vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyShaderModule( ShaderModule shaderModule, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const - { - return static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); - } - + Result createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); - } - + ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineCacheDeleter deleter( this, allocator ); - return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); - } + UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); - } - + void destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const - { - vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyPipelineCache( PipelineCache pipelineCache, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const - { - return static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); - } - + Result getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache ) const - { - std::vector data; - size_t dataSize; - Result result; - do - { - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); - if ( ( result == Result::eSuccess ) && dataSize ) - { - data.resize( dataSize ); - result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( dataSize <= data.size() ); - data.resize( dataSize ); - return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); - } + template > + typename ResultValueType>::type getPipelineCacheData( PipelineCache pipelineCache ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const - { - return static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); - } - + Result mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const - { - Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); - return createResultValue( result, "vk::Device::mergePipelineCaches" ); - } + ResultValueType::type mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const - { - return static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); - } - + Result createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - 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() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); - } - - ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional 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 ) ) ); - return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); - } - + template > + typename ResultValueType>::type createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - PipelineDeleter deleter( this, allocator ); - std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); - std::vector uniquePipelines; - uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) - { - uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); - } - return uniquePipelines; - } - - UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineDeleter deleter( this, allocator ); - return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); - } + template > + std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const - { - return static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); - } - + Result createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector pipelines( createInfos.size() ); - 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() ) ) ); - return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); - } - - ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional 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 ) ) ); - return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); - } - + template > + typename ResultValueType>::type createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const - { - PipelineDeleter deleter( this, allocator ); - std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); - std::vector uniquePipelines; - uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) - { - uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); - } - return uniquePipelines; - } - - UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineDeleter deleter( this, allocator ); - return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); - } + template > + std::vector createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); - } - + void destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const - { - vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyPipeline( Pipeline pipeline, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const - { - return static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); - } - + Result createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); - } - + ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const - { - PipelineLayoutDeleter deleter( this, allocator ); - return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); - } + UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); - } - + void destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const - { - vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const - { - return static_cast( vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); - } - + Result createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, sampler, "vk::Device::createSampler" ); - } - + ResultValueType::type createSampler( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const - { - SamplerDeleter deleter( this, allocator ); - return UniqueSampler( createSampler( createInfo, allocator ), deleter ); - } + UniqueSampler createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const - { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); - } - + void destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySampler( Sampler sampler, Optional allocator = nullptr ) const - { - vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator)) ); - } + void destroySampler( Sampler sampler, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const - { - return static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); - } - + Result createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); - } - + ResultValueType::type createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const - { - DescriptorSetLayoutDeleter deleter( this, allocator ); - return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); - } + UniqueDescriptorSetLayout createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); - } - + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const - { - vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const - { - return static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); - } - + Result createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); - } - + ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const - { - DescriptorPoolDeleter deleter( this, allocator ); - return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); - } + UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); - } - + void destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const - { - vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const - { - return static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const - { - Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetDescriptorPool" ); - } + Result resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const; +#else + ResultValueType::type resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags = DescriptorPoolResetFlags() ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const - { - return static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); - } - + Result allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const - { - std::vector descriptorSets( allocateInfo.descriptorSetCount ); - Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); - } - + template > + typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const - { - DescriptorSetDeleter deleter( this, allocateInfo.descriptorPool ); - std::vector descriptorSets = allocateDescriptorSets( allocateInfo ); - std::vector uniqueDescriptorSets; - uniqueDescriptorSets.reserve( descriptorSets.size() ); - for ( auto descriptorSet : descriptorSets ) - { - uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); - } - return uniqueDescriptorSets; - } + template > + std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const - { - return static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); - } - + Result freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const - { - Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, "vk::Device::freeDescriptorSets" ); - } + ResultValueType::type freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); - } - + void updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const - { - vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); - } + void updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const - { - return static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); - } - + Result createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); - } - + ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const - { - FramebufferDeleter deleter( this, allocator ); - return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); - } + UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const - { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); - } - + void destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const - { - vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyFramebuffer( Framebuffer framebuffer, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const - { - return static_cast( vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); - } - + Result createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); - } - + ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const - { - RenderPassDeleter deleter( this, allocator ); - return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); - } + UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const - { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); - } - + void destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const - { - vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyRenderPass( RenderPass renderPass, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const - { - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); - } - + void getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - Extent2D getRenderAreaGranularity( RenderPass renderPass ) const - { - Extent2D granularity; - vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); - return granularity; - } + Extent2D getRenderAreaGranularity( RenderPass renderPass ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const - { - return static_cast( vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); - } - + Result createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); - } - + ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const - { - CommandPoolDeleter deleter( this, allocator ); - return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); - } + UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const - { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); - } - + void destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const - { - vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyCommandPool( CommandPool commandPool, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const - { - return static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const - { - Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetCommandPool" ); - } + Result resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; +#else + ResultValueType::type resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const - { - return static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); - } - + Result allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const - { - std::vector commandBuffers( allocateInfo.commandBufferCount ); - Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); - return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); - } - + template > + typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const - { - CommandBufferDeleter deleter( this, allocateInfo.commandPool ); - std::vector commandBuffers = allocateCommandBuffers( allocateInfo ); - std::vector uniqueCommandBuffers; - uniqueCommandBuffers.reserve( commandBuffers.size() ); - for ( auto commandBuffer : commandBuffers ) - { - uniqueCommandBuffers.push_back( UniqueCommandBuffer( commandBuffer, deleter ) ); - } - return uniqueCommandBuffers; - } + template > + std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); - } - + void freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const - { - vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); - } + void freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const - { - return static_cast( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); - } - + Result createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr ) const - { - std::vector swapchains( createInfos.size() ); - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); - return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); - } - - ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SwapchainKHR swapchain; - Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); - } - + template > + typename ResultValueType>::type createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - template > - std::vector createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const - { - SwapchainKHRDeleter deleter( this, allocator ); - std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); - std::vector uniqueSwapchainKHRs; - uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); - for ( auto swapchainKHR : swapchainKHRs ) - { - uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); - } - return uniqueSwapchainKHRs; - } - - UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SwapchainKHRDeleter deleter( this, allocator ); - return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); - } + template > + std::vector createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const; + UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const - { - return static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); - } - + Result createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); - } - + ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SwapchainKHRDeleter deleter( this, allocator ); - return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); - } + UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const - { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); - } - + void destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const - { - vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator)) ); - } + void destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const - { - return static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); - } - + Result getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const - { - std::vector swapchainImages; - uint32_t swapchainImageCount; - Result result; - do - { - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && swapchainImageCount ) - { - swapchainImages.resize( swapchainImageCount ); - result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( swapchainImageCount <= swapchainImages.size() ); - swapchainImages.resize( swapchainImageCount ); - return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); - } + template > + typename ResultValueType>::type getSwapchainImagesKHR( SwapchainKHR swapchain ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const - { - return static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); - } - + Result acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const - { - uint32_t imageIndex; - Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); - return createResultValue( result, imageIndex, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); - } + ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const - { - return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); - } - + Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectNameEXT() const - { - DebugMarkerObjectNameInfoEXT nameInfo; - Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); - return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); - } + ResultValueType::type debugMarkerSetObjectNameEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const - { - return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); - } - + Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectTagEXT() const - { - DebugMarkerObjectTagInfoEXT tagInfo; - Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); - return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); - } + ResultValueType::type debugMarkerSetObjectTagEXT() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const - { - return static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - + Result getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const - { - HANDLE handle; - Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); - } -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + ResultValueType::type getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ - Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const - { - return static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); - } - + Result createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const - { - IndirectCommandsLayoutNVX indirectCommandsLayout; - Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &indirectCommandsLayout ) ) ); - return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); - } - + ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const - { - IndirectCommandsLayoutNVXDeleter deleter( this, allocator ); - return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); - } + UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); - } - + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr ) const - { - vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const - { - return static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); - } - + Result createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const - { - ObjectTableNVX objectTable; - Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &objectTable ) ) ); - return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); - } - + ResultValueType::type createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const - { - ObjectTableNVXDeleter deleter( this, allocator ); - return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); - } + UniqueObjectTableNVX createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const - { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); - } - + void destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr ) const - { - vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const - { - return static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); - } - + Result registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( pObjectTableEntries.size() == objectIndices.size() ); -#else - if ( pObjectTableEntries.size() != objectIndices.size() ) - { - throw std::logic_error( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::registerObjectsNVX" ); - } + ResultValueType::type registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const - { - return static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); - } - + Result unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( objectEntryTypes.size() == objectIndices.size() ); -#else - if ( objectEntryTypes.size() != objectIndices.size() ) - { - throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - Result result = static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); - return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); - } + ResultValueType::type unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const - { - vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); - } - - - Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const - { - return static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); - } + void trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const; + Result displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const - { - Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); - return createResultValue( result, "vk::Device::displayPowerControlEXT" ); - } + ResultValueType::type displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - + Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerEventEXT" ); - } + ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const - { - return static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); - } - + Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const - { - Fence fence; - Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); - } + ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const - { - return static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); - } - + Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const - { - uint64_t counterValue; - Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); - return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); - } + ResultValue getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -20065,125 +18873,1842 @@ namespace vk static_assert( sizeof( Device ) == sizeof( VkDevice ), "handle and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE void BufferDeleter::operator()( Buffer buffer ) + class BufferDeleter { - m_device->destroyBuffer( buffer, m_allocator ); + public: + BufferDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Buffer buffer ) + { + m_device.destroyBuffer( buffer, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class BufferViewDeleter + { + public: + BufferViewDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( BufferView bufferView ) + { + m_device.destroyBufferView( bufferView, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class CommandBufferDeleter + { + public: + CommandBufferDeleter( Device device = Device(), CommandPool commandPool = CommandPool() ) + : m_device( device ) + , m_commandPool( commandPool ) + {} + + void operator()( CommandBuffer commandBuffer ) + { + m_device.freeCommandBuffers( m_commandPool, commandBuffer ); + } + + private: + Device m_device; + CommandPool m_commandPool; + }; + + class CommandPoolDeleter + { + public: + CommandPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( CommandPool commandPool ) + { + m_device.destroyCommandPool( commandPool, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class DescriptorPoolDeleter + { + public: + DescriptorPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DescriptorPool descriptorPool ) + { + m_device.destroyDescriptorPool( descriptorPool, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class DescriptorSetDeleter + { + public: + DescriptorSetDeleter( Device device = Device(), DescriptorPool descriptorPool = DescriptorPool() ) + : m_device( device ) + , m_descriptorPool( descriptorPool ) + {} + + void operator()( DescriptorSet descriptorSet ) + { + m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); + } + + private: + Device m_device; + DescriptorPool m_descriptorPool; + }; + + class DescriptorSetLayoutDeleter + { + public: + DescriptorSetLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DescriptorSetLayout descriptorSetLayout ) + { + m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class DeviceMemoryDeleter + { + public: + DeviceMemoryDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( DeviceMemory deviceMemory ) + { + m_device.freeMemory( deviceMemory, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class EventDeleter + { + public: + EventDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Event event ) + { + m_device.destroyEvent( event, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class FenceDeleter + { + public: + FenceDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Fence fence ) + { + m_device.destroyFence( fence, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class FramebufferDeleter + { + public: + FramebufferDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Framebuffer framebuffer ) + { + m_device.destroyFramebuffer( framebuffer, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class ImageDeleter + { + public: + ImageDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Image image ) + { + m_device.destroyImage( image, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class ImageViewDeleter + { + public: + ImageViewDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ImageView imageView ) + { + m_device.destroyImageView( imageView, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class IndirectCommandsLayoutNVXDeleter + { + public: + IndirectCommandsLayoutNVXDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) + { + m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class ObjectTableNVXDeleter + { + public: + ObjectTableNVXDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ObjectTableNVX objectTableNVX ) + { + m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class PipelineDeleter + { + public: + PipelineDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Pipeline pipeline ) + { + m_device.destroyPipeline( pipeline, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class PipelineCacheDeleter + { + public: + PipelineCacheDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( PipelineCache pipelineCache ) + { + m_device.destroyPipelineCache( pipelineCache, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class PipelineLayoutDeleter + { + public: + PipelineLayoutDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( PipelineLayout pipelineLayout ) + { + m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class QueryPoolDeleter + { + public: + QueryPoolDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( QueryPool queryPool ) + { + m_device.destroyQueryPool( queryPool, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class RenderPassDeleter + { + public: + RenderPassDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( RenderPass renderPass ) + { + m_device.destroyRenderPass( renderPass, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class SamplerDeleter + { + public: + SamplerDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Sampler sampler ) + { + m_device.destroySampler( sampler, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class SemaphoreDeleter + { + public: + SemaphoreDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( Semaphore semaphore ) + { + m_device.destroySemaphore( semaphore, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class ShaderModuleDeleter + { + public: + ShaderModuleDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( ShaderModule shaderModule ) + { + m_device.destroyShaderModule( shaderModule, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + + class SwapchainKHRDeleter + { + public: + SwapchainKHRDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + void operator()( SwapchainKHR swapchainKHR ) + { + m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName ) const + { + return vkGetDeviceProcAddr( m_device, pName ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const std::string & name ) const + { + return vkGetDeviceProcAddr( m_device, name.c_str() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroy( Optional allocator ) const + { + vkDestroyDevice( m_device, reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex, Queue* pQueue ) const + { + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( pQueue ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Queue Device::getQueue( uint32_t queueFamilyIndex, uint32_t queueIndex ) const + { + Queue queue; + vkGetDeviceQueue( m_device, queueFamilyIndex, queueIndex, reinterpret_cast( &queue ) ); + return queue; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::waitIdle() const + { + return static_cast( vkDeviceWaitIdle( m_device ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::waitIdle() const + { + Result result = static_cast( vkDeviceWaitIdle( m_device ) ); + return createResultValue( result, "vk::Device::waitIdle" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::allocateMemory( const MemoryAllocateInfo* pAllocateInfo, const AllocationCallbacks* pAllocator, DeviceMemory* pMemory ) const + { + return static_cast( vkAllocateMemory( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMemory ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + { + DeviceMemory memory; + Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &memory ) ) ); + return createResultValue( result, memory, "vk::Device::allocateMemory" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + { + DeviceMemoryDeleter deleter( *this, allocator ); + return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, const AllocationCallbacks* pAllocator ) const + { + vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::freeMemory( DeviceMemory memory, Optional allocator ) const + { + vkFreeMemory( m_device, static_cast( memory ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags, void** ppData ) const + { + return static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), ppData ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::mapMemory( DeviceMemory memory, DeviceSize offset, DeviceSize size, MemoryMapFlags flags ) const + { + void* pData; + Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); + return createResultValue( result, pData, "vk::Device::mapMemory" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::unmapMemory( DeviceMemory memory ) const + { + vkUnmapMemory( m_device, static_cast( memory ) ); } - VULKAN_HPP_INLINE void BufferViewDeleter::operator()( BufferView bufferView ) + VULKAN_HPP_INLINE Result Device::flushMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const { - m_device->destroyBufferView( bufferView, m_allocator ); + return static_cast( vkFlushMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::flushMappedMemoryRanges( ArrayProxy memoryRanges ) const + { + Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::invalidateMappedMemoryRanges( uint32_t memoryRangeCount, const MappedMemoryRange* pMemoryRanges ) const + { + return static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRangeCount, reinterpret_cast( pMemoryRanges ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const + { + Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); + return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getMemoryCommitment( DeviceMemory memory, DeviceSize* pCommittedMemoryInBytes ) const + { + vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), pCommittedMemoryInBytes ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DeviceSize Device::getMemoryCommitment( DeviceMemory memory ) const + { + DeviceSize committedMemoryInBytes; + vkGetDeviceMemoryCommitment( m_device, static_cast( memory ), &committedMemoryInBytes ); + return committedMemoryInBytes; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getBufferMemoryRequirements( Buffer buffer, MemoryRequirements* pMemoryRequirements ) const + { + vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( pMemoryRequirements ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE MemoryRequirements Device::getBufferMemoryRequirements( Buffer buffer ) const + { + MemoryRequirements memoryRequirements; + vkGetBufferMemoryRequirements( m_device, static_cast( buffer ), reinterpret_cast( &memoryRequirements ) ); + return memoryRequirements; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, "vk::Device::bindBufferMemory" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getImageMemoryRequirements( Image image, MemoryRequirements* pMemoryRequirements ) const + { + vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( pMemoryRequirements ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE MemoryRequirements Device::getImageMemoryRequirements( Image image ) const + { + MemoryRequirements memoryRequirements; + vkGetImageMemoryRequirements( m_device, static_cast( image ), reinterpret_cast( &memoryRequirements ) ); + return memoryRequirements; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + return static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const + { + Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); + return createResultValue( result, "vk::Device::bindImageMemory" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getImageSparseMemoryRequirements( Image image, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements* pSparseMemoryRequirements ) const + { + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), pSparseMemoryRequirementCount, reinterpret_cast( pSparseMemoryRequirements ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector Device::getImageSparseMemoryRequirements( Image image ) const + { + std::vector sparseMemoryRequirements; + uint32_t sparseMemoryRequirementCount; + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, nullptr ); + sparseMemoryRequirements.resize( sparseMemoryRequirementCount ); + vkGetImageSparseMemoryRequirements( m_device, static_cast( image ), &sparseMemoryRequirementCount, reinterpret_cast( sparseMemoryRequirements.data() ) ); + return sparseMemoryRequirements; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createFence( const FenceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const + { + return static_cast( vkCreateFence( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createFence( const FenceCreateInfo & createInfo, Optional allocator ) const + { + Fence fence; + Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::createFence" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const + { + FenceDeleter deleter( *this, allocator ); + return UniqueFence( createFence( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, const AllocationCallbacks* pAllocator ) const + { + vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyFence( Fence fence, Optional allocator ) const + { + vkDestroyFence( m_device, static_cast( fence ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::resetFences( uint32_t fenceCount, const Fence* pFences ) const + { + return static_cast( vkResetFences( m_device, fenceCount, reinterpret_cast( pFences ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::resetFences( ArrayProxy fences ) const + { + Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); + return createResultValue( result, "vk::Device::resetFences" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + { + return static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const + { + Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); + return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::waitForFences( uint32_t fenceCount, const Fence* pFences, Bool32 waitAll, uint64_t timeout ) const + { + return static_cast( vkWaitForFences( m_device, fenceCount, reinterpret_cast( pFences ), waitAll, timeout ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const + { + Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); + return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSemaphore( const SemaphoreCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Semaphore* pSemaphore ) const + { + return static_cast( vkCreateSemaphore( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSemaphore ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + { + Semaphore semaphore; + Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &semaphore ) ) ); + return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + { + SemaphoreDeleter deleter( *this, allocator ); + return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, const AllocationCallbacks* pAllocator ) const + { + vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySemaphore( Semaphore semaphore, Optional allocator ) const + { + vkDestroySemaphore( m_device, static_cast( semaphore ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createEvent( const EventCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Event* pEvent ) const + { + return static_cast( vkCreateEvent( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pEvent ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createEvent( const EventCreateInfo & createInfo, Optional allocator ) const + { + Event event; + Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &event ) ) ); + return createResultValue( result, event, "vk::Device::createEvent" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueEvent Device::createEventUnique( const EventCreateInfo & createInfo, Optional allocator ) const + { + EventDeleter deleter( *this, allocator ); + return UniqueEvent( createEvent( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, const AllocationCallbacks* pAllocator ) const + { + vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyEvent( Event event, Optional allocator ) const + { + vkDestroyEvent( m_device, static_cast( event ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + return static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const + { + Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::setEvent( Event event ) const + { + return static_cast( vkSetEvent( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::setEvent( Event event ) const + { + Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::setEvent" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetEvent( Event event ) const + { + return static_cast( vkResetEvent( m_device, static_cast( event ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetEvent( Event event ) const + { + Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); + return createResultValue( result, "vk::Device::resetEvent" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createQueryPool( const QueryPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, QueryPool* pQueryPool ) const + { + return static_cast( vkCreateQueryPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pQueryPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + { + QueryPool queryPool; + Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &queryPool ) ) ); + return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + { + QueryPoolDeleter deleter( *this, allocator ); + return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyQueryPool( QueryPool queryPool, Optional allocator ) const + { + vkDestroyQueryPool( m_device, static_cast( queryPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, DeviceSize stride, QueryResultFlags flags ) const + { + return static_cast( vkGetQueryPoolResults( m_device, static_cast( queryPool ), firstQuery, queryCount, dataSize, pData, stride, static_cast( flags ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE Result Device::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, data.size() * sizeof( T ) , reinterpret_cast( data.data() ), stride, static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createBuffer( const BufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Buffer* pBuffer ) const + { + return static_cast( vkCreateBuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pBuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createBuffer( const BufferCreateInfo & createInfo, Optional allocator ) const + { + Buffer buffer; + Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &buffer ) ) ); + return createResultValue( result, buffer, "vk::Device::createBuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const + { + BufferDeleter deleter( *this, allocator ); + return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, const AllocationCallbacks* pAllocator ) const + { + vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyBuffer( Buffer buffer, Optional allocator ) const + { + vkDestroyBuffer( m_device, static_cast( buffer ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createBufferView( const BufferViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, BufferView* pView ) const + { + return static_cast( vkCreateBufferView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferView( const BufferViewCreateInfo & createInfo, Optional allocator ) const + { + BufferView view; + Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, "vk::Device::createBufferView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueBufferView Device::createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator ) const + { + BufferViewDeleter deleter( *this, allocator ); + return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, const AllocationCallbacks* pAllocator ) const + { + vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyBufferView( BufferView bufferView, Optional allocator ) const + { + vkDestroyBufferView( m_device, static_cast( bufferView ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createImage( const ImageCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Image* pImage ) const + { + return static_cast( vkCreateImage( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pImage ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createImage( const ImageCreateInfo & createInfo, Optional allocator ) const + { + Image image; + Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &image ) ) ); + return createResultValue( result, image, "vk::Device::createImage" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const + { + ImageDeleter deleter( *this, allocator ); + return UniqueImage( createImage( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyImage( Image image, const AllocationCallbacks* pAllocator ) const + { + vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyImage( Image image, Optional allocator ) const + { + vkDestroyImage( m_device, static_cast( image ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getImageSubresourceLayout( Image image, const ImageSubresource* pSubresource, SubresourceLayout* pLayout ) const + { + vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( pSubresource ), reinterpret_cast( pLayout ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE SubresourceLayout Device::getImageSubresourceLayout( Image image, const ImageSubresource & subresource ) const + { + SubresourceLayout layout; + vkGetImageSubresourceLayout( m_device, static_cast( image ), reinterpret_cast( &subresource ), reinterpret_cast( &layout ) ); + return layout; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createImageView( const ImageViewCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ImageView* pView ) const + { + return static_cast( vkCreateImageView( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pView ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createImageView( const ImageViewCreateInfo & createInfo, Optional allocator ) const + { + ImageView view; + Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &view ) ) ); + return createResultValue( result, view, "vk::Device::createImageView" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const + { + ImageViewDeleter deleter( *this, allocator ); + return UniqueImageView( createImageView( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, const AllocationCallbacks* pAllocator ) const + { + vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyImageView( ImageView imageView, Optional allocator ) const + { + vkDestroyImageView( m_device, static_cast( imageView ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createShaderModule( const ShaderModuleCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, ShaderModule* pShaderModule ) const + { + return static_cast( vkCreateShaderModule( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pShaderModule ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModule( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + { + ShaderModule shaderModule; + Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &shaderModule ) ) ); + return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueShaderModule Device::createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator ) const + { + ShaderModuleDeleter deleter( *this, allocator ); + return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, const AllocationCallbacks* pAllocator ) const + { + vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyShaderModule( ShaderModule shaderModule, Optional allocator ) const + { + vkDestroyShaderModule( m_device, static_cast( shaderModule ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createPipelineCache( const PipelineCacheCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineCache* pPipelineCache ) const + { + return static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineCache ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + { + PipelineCache pipelineCache; + Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineCache ) ) ); + return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineCache Device::createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator ) const + { + PipelineCacheDeleter deleter( *this, allocator ); + return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipelineCache( PipelineCache pipelineCache, Optional allocator ) const + { + vkDestroyPipelineCache( m_device, static_cast( pipelineCache ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getPipelineCacheData( PipelineCache pipelineCache, size_t* pDataSize, void* pData ) const + { + return static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), pDataSize, pData ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getPipelineCacheData( PipelineCache pipelineCache ) const + { + std::vector data; + size_t dataSize; + Result result; + do + { + result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && dataSize ) + { + data.resize( dataSize ); + result = static_cast( vkGetPipelineCacheData( m_device, static_cast( pipelineCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( dataSize <= data.size() ); + data.resize( dataSize ); + return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::mergePipelineCaches( PipelineCache dstCache, uint32_t srcCacheCount, const PipelineCache* pSrcCaches ) const + { + return static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const + { + Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); + return createResultValue( result, "vk::Device::mergePipelineCaches" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createGraphicsPipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const GraphicsPipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + { + return static_cast( vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + std::vector pipelines( createInfos.size() ); + 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() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createGraphicsPipelines" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) 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 ) ) ); + return createResultValue( result, pipeline, "vk::Device::createGraphicsPipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); + std::vector uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) + { + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); + } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createComputePipelines( PipelineCache pipelineCache, uint32_t createInfoCount, const ComputePipelineCreateInfo* pCreateInfos, const AllocationCallbacks* pAllocator, Pipeline* pPipelines ) const + { + return static_cast( vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfoCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelines ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelines( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + std::vector pipelines( createInfos.size() ); + 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() ) ) ); + return createResultValue( result, pipelines, "vk::Device::createComputePipelines" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) 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 ) ) ); + return createResultValue( result, pipeline, "vk::Device::createComputePipeline" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); + std::vector uniquePipelines; + uniquePipelines.reserve( pipelines.size() ); + for ( auto pipeline : pipelines ) + { + uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); + } + return uniquePipelines; + } + VULKAN_HPP_INLINE UniquePipeline Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + { + PipelineDeleter deleter( *this, allocator ); + return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipeline( Pipeline pipeline, Optional allocator ) const + { + vkDestroyPipeline( m_device, static_cast( pipeline ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createPipelineLayout( const PipelineLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, PipelineLayout* pPipelineLayout ) const + { + return static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pPipelineLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + { + PipelineLayout pipelineLayout; + Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &pipelineLayout ) ) ); + return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + { + PipelineLayoutDeleter deleter( *this, allocator ); + return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyPipelineLayout( PipelineLayout pipelineLayout, Optional allocator ) const + { + vkDestroyPipelineLayout( m_device, static_cast( pipelineLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSampler( const SamplerCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Sampler* pSampler ) const + { + return static_cast( vkCreateSampler( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSampler ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSampler( const SamplerCreateInfo & createInfo, Optional allocator ) const + { + Sampler sampler; + Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &sampler ) ) ); + return createResultValue( result, sampler, "vk::Device::createSampler" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const + { + SamplerDeleter deleter( *this, allocator ); + return UniqueSampler( createSampler( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, const AllocationCallbacks* pAllocator ) const + { + vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySampler( Sampler sampler, Optional allocator ) const + { + vkDestroySampler( m_device, static_cast( sampler ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorSetLayout* pSetLayout ) const + { + return static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSetLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayout( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + { + DescriptorSetLayout setLayout; + Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &setLayout ) ) ); + return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + { + DescriptorSetLayoutDeleter deleter( *this, allocator ); + return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyDescriptorSetLayout( DescriptorSetLayout descriptorSetLayout, Optional allocator ) const + { + vkDestroyDescriptorSetLayout( m_device, static_cast( descriptorSetLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createDescriptorPool( const DescriptorPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, DescriptorPool* pDescriptorPool ) const + { + return static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDescriptorPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + { + DescriptorPool descriptorPool; + Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &descriptorPool ) ) ); + return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + { + DescriptorPoolDeleter deleter( *this, allocator ); + return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyDescriptorPool( DescriptorPool descriptorPool, Optional allocator ) const + { + vkDestroyDescriptorPool( m_device, static_cast( descriptorPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + return static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const + { + Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::resetDescriptorPool" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::allocateDescriptorSets( const DescriptorSetAllocateInfo* pAllocateInfo, DescriptorSet* pDescriptorSets ) const + { + return static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const + { + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const + { + DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); + std::vector descriptorSets = allocateDescriptorSets( allocateInfo ); + std::vector uniqueDescriptorSets; + uniqueDescriptorSets.reserve( descriptorSets.size() ); + for ( auto descriptorSet : descriptorSets ) + { + uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); + } + return uniqueDescriptorSets; + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::freeDescriptorSets( DescriptorPool descriptorPool, uint32_t descriptorSetCount, const DescriptorSet* pDescriptorSets ) const + { + return static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSetCount, reinterpret_cast( pDescriptorSets ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const + { + Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); + return createResultValue( result, "vk::Device::freeDescriptorSets" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::updateDescriptorSets( uint32_t descriptorWriteCount, const WriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const CopyDescriptorSet* pDescriptorCopies ) const + { + vkUpdateDescriptorSets( m_device, descriptorWriteCount, reinterpret_cast( pDescriptorWrites ), descriptorCopyCount, reinterpret_cast( pDescriptorCopies ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::updateDescriptorSets( ArrayProxy descriptorWrites, ArrayProxy descriptorCopies ) const + { + vkUpdateDescriptorSets( m_device, descriptorWrites.size() , reinterpret_cast( descriptorWrites.data() ), descriptorCopies.size() , reinterpret_cast( descriptorCopies.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createFramebuffer( const FramebufferCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Framebuffer* pFramebuffer ) const + { + return static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFramebuffer ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator ) const + { + Framebuffer framebuffer; + Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &framebuffer ) ) ); + return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const + { + FramebufferDeleter deleter( *this, allocator ); + return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, const AllocationCallbacks* pAllocator ) const + { + vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyFramebuffer( Framebuffer framebuffer, Optional allocator ) const + { + vkDestroyFramebuffer( m_device, static_cast( framebuffer ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createRenderPass( const RenderPassCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, RenderPass* pRenderPass ) const + { + return static_cast( vkCreateRenderPass( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pRenderPass ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator ) const + { + RenderPass renderPass; + Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &renderPass ) ) ); + return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const + { + RenderPassDeleter deleter( *this, allocator ); + return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, const AllocationCallbacks* pAllocator ) const + { + vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyRenderPass( RenderPass renderPass, Optional allocator ) const + { + vkDestroyRenderPass( m_device, static_cast( renderPass ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::getRenderAreaGranularity( RenderPass renderPass, Extent2D* pGranularity ) const + { + vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( pGranularity ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Extent2D Device::getRenderAreaGranularity( RenderPass renderPass ) const + { + Extent2D granularity; + vkGetRenderAreaGranularity( m_device, static_cast( renderPass ), reinterpret_cast( &granularity ) ); + return granularity; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createCommandPool( const CommandPoolCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, CommandPool* pCommandPool ) const + { + return static_cast( vkCreateCommandPool( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCommandPool ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + { + CommandPool commandPool; + Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &commandPool ) ) ); + return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + { + CommandPoolDeleter deleter( *this, allocator ); + return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, const AllocationCallbacks* pAllocator ) const + { + vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyCommandPool( CommandPool commandPool, Optional allocator ) const + { + vkDestroyCommandPool( m_device, static_cast( commandPool ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + { + return static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const + { + Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); + return createResultValue( result, "vk::Device::resetCommandPool" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::allocateCommandBuffers( const CommandBufferAllocateInfo* pAllocateInfo, CommandBuffer* pCommandBuffers ) const + { + return static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( pAllocateInfo ), reinterpret_cast( pCommandBuffers ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const + { + std::vector commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const + { + CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); + std::vector commandBuffers = allocateCommandBuffers( allocateInfo ); + std::vector uniqueCommandBuffers; + uniqueCommandBuffers.reserve( commandBuffers.size() ); + for ( auto commandBuffer : commandBuffers ) + { + uniqueCommandBuffers.push_back( UniqueCommandBuffer( commandBuffer, deleter ) ); + } + return uniqueCommandBuffers; + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, uint32_t commandBufferCount, const CommandBuffer* pCommandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBufferCount, reinterpret_cast( pCommandBuffers ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::freeCommandBuffers( CommandPool commandPool, ArrayProxy commandBuffers ) const + { + vkFreeCommandBuffers( m_device, static_cast( commandPool ), commandBuffers.size() , reinterpret_cast( commandBuffers.data() ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSharedSwapchainsKHR( uint32_t swapchainCount, const SwapchainCreateInfoKHR* pCreateInfos, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchains ) const + { + return static_cast( vkCreateSharedSwapchainsKHR( m_device, swapchainCount, reinterpret_cast( pCreateInfos ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchains ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHR( ArrayProxy createInfos, Optional allocator ) const + { + std::vector swapchains( createInfos.size() ); + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( swapchains.data() ) ) ); + return createResultValue( result, swapchains, "vk::Device::createSharedSwapchainsKHR" ); + } + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSharedSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + template + VULKAN_HPP_INLINE std::vector Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); + std::vector uniqueSwapchainKHRs; + uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); + for ( auto swapchainKHR : swapchainKHRs ) + { + uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); + } + return uniqueSwapchainKHRs; + } + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createSwapchainKHR( const SwapchainCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SwapchainKHR* pSwapchain ) const + { + return static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSwapchain ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &swapchain ) ) ); + return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + { + SwapchainKHRDeleter deleter( *this, allocator ); + return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, const AllocationCallbacks* pAllocator ) const + { + vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroySwapchainKHR( SwapchainKHR swapchain, Optional allocator ) const + { + vkDestroySwapchainKHR( m_device, static_cast( swapchain ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getSwapchainImagesKHR( SwapchainKHR swapchain, uint32_t* pSwapchainImageCount, Image* pSwapchainImages ) const + { + return static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), pSwapchainImageCount, reinterpret_cast( pSwapchainImages ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getSwapchainImagesKHR( SwapchainKHR swapchain ) const + { + std::vector swapchainImages; + uint32_t swapchainImageCount; + Result result; + do + { + result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && swapchainImageCount ) + { + swapchainImages.resize( swapchainImageCount ); + result = static_cast( vkGetSwapchainImagesKHR( m_device, static_cast( swapchain ), &swapchainImageCount, reinterpret_cast( swapchainImages.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( swapchainImageCount <= swapchainImages.size() ); + swapchainImages.resize( swapchainImageCount ); + return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence, uint32_t* pImageIndex ) const + { + return static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), pImageIndex ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue Device::acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const + { + uint32_t imageIndex; + Result result = static_cast( vkAcquireNextImageKHR( m_device, static_cast( swapchain ), timeout, static_cast( semaphore ), static_cast( fence ), &imageIndex ) ); + return createResultValue( result, imageIndex, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const + { + return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT() const + { + DebugMarkerObjectNameInfoEXT nameInfo; + Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const + { + return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT() const + { + DebugMarkerObjectTagInfoEXT tagInfo; + Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VULKAN_HPP_INLINE Result Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) const + { + return static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), pHandle ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryWin32HandleNV( DeviceMemory memory, ExternalMemoryHandleTypeFlagsNV handleType ) const + { + HANDLE handle; + Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); + return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + + VULKAN_HPP_INLINE Result Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, IndirectCommandsLayoutNVX* pIndirectCommandsLayout ) const + { + return static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pIndirectCommandsLayout ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + { + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &indirectCommandsLayout ) ) ); + return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + { + IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); + return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, const AllocationCallbacks* pAllocator ) const + { + vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyIndirectCommandsLayoutNVX( IndirectCommandsLayoutNVX indirectCommandsLayout, Optional allocator ) const + { + vkDestroyIndirectCommandsLayoutNVX( m_device, static_cast( indirectCommandsLayout ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::createObjectTableNVX( const ObjectTableCreateInfoNVX* pCreateInfo, const AllocationCallbacks* pAllocator, ObjectTableNVX* pObjectTable ) const + { + return static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pObjectTable ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVX( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + { + ObjectTableNVX objectTable; + Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &objectTable ) ) ); + return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + { + ObjectTableNVXDeleter deleter( *this, allocator ); + return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, const AllocationCallbacks* pAllocator ) const + { + vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyObjectTableNVX( ObjectTableNVX objectTable, Optional allocator ) const + { + vkDestroyObjectTableNVX( m_device, static_cast( objectTable ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::registerObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices ) const + { + return static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( ppObjectTableEntries ), pObjectIndices ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerObjectsNVX( ObjectTableNVX objectTable, ArrayProxy pObjectTableEntries, ArrayProxy objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( pObjectTableEntries.size() == objectIndices.size() ); +#else + if ( pObjectTableEntries.size() != objectIndices.size() ) + { + throw std::logic_error( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast( vkRegisterObjectsNVX( m_device, static_cast( objectTable ), pObjectTableEntries.size() , reinterpret_cast( pObjectTableEntries.data() ), objectIndices.data() ) ); + return createResultValue( result, "vk::Device::registerObjectsNVX" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::unregisterObjectsNVX( ObjectTableNVX objectTable, uint32_t objectCount, const ObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices ) const + { + return static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectCount, reinterpret_cast( pObjectEntryTypes ), pObjectIndices ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::unregisterObjectsNVX( ObjectTableNVX objectTable, ArrayProxy objectEntryTypes, ArrayProxy objectIndices ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( objectEntryTypes.size() == objectIndices.size() ); +#else + if ( objectEntryTypes.size() != objectIndices.size() ) + { + throw std::logic_error( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + Result result = static_cast( vkUnregisterObjectsNVX( m_device, static_cast( objectTable ), objectEntryTypes.size() , reinterpret_cast( objectEntryTypes.data() ), objectIndices.data() ) ); + return createResultValue( result, "vk::Device::unregisterObjectsNVX" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::trimCommandPoolKHR( CommandPool commandPool, CommandPoolTrimFlagsKHR flags ) const + { + vkTrimCommandPoolKHR( m_device, static_cast( commandPool ), static_cast( flags ) ); } - VULKAN_HPP_INLINE void CommandBufferDeleter::operator()( CommandBuffer commandBuffer ) + VULKAN_HPP_INLINE Result Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT* pDisplayPowerInfo ) const { - m_device->freeCommandBuffers( m_commandPool, commandBuffer ); + return static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayPowerInfo ) ) ); } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const + { + Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); + return createResultValue( result, "vk::Device::displayPowerControlEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandPoolDeleter::operator()( CommandPool commandPool ) + VULKAN_HPP_INLINE Result Device::registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const { - m_device->destroyCommandPool( commandPool, m_allocator ); + return static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( pDeviceEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::registerEventEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void DescriptorPoolDeleter::operator()( DescriptorPool descriptorPool ) + VULKAN_HPP_INLINE Result Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const { - m_device->destroyDescriptorPool( descriptorPool, m_allocator ); + return static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( pDisplayEventInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pFence ) ) ); } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const + { + Fence fence; + Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); + return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void DescriptorSetDeleter::operator()( DescriptorSet descriptorSet ) + VULKAN_HPP_INLINE Result Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const { - m_device->freeDescriptorSets( m_descriptorPool, descriptorSet ); + return static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), pCounterValue ) ); } - - VULKAN_HPP_INLINE void DescriptorSetLayoutDeleter::operator()( DescriptorSetLayout descriptorSetLayout ) +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValue Device::getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter ) const { - m_device->destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); - } - - VULKAN_HPP_INLINE void DeviceMemoryDeleter::operator()( DeviceMemory deviceMemory ) - { - m_device->freeMemory( deviceMemory, m_allocator ); - } - - VULKAN_HPP_INLINE void EventDeleter::operator()( Event event ) - { - m_device->destroyEvent( event, m_allocator ); - } - - VULKAN_HPP_INLINE void FenceDeleter::operator()( Fence fence ) - { - m_device->destroyFence( fence, m_allocator ); - } - - VULKAN_HPP_INLINE void FramebufferDeleter::operator()( Framebuffer framebuffer ) - { - m_device->destroyFramebuffer( framebuffer, m_allocator ); - } - - VULKAN_HPP_INLINE void ImageDeleter::operator()( Image image ) - { - m_device->destroyImage( image, m_allocator ); - } - - VULKAN_HPP_INLINE void ImageViewDeleter::operator()( ImageView imageView ) - { - m_device->destroyImageView( imageView, m_allocator ); - } - - VULKAN_HPP_INLINE void IndirectCommandsLayoutNVXDeleter::operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) - { - m_device->destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); - } - - VULKAN_HPP_INLINE void ObjectTableNVXDeleter::operator()( ObjectTableNVX objectTableNVX ) - { - m_device->destroyObjectTableNVX( objectTableNVX, m_allocator ); - } - - VULKAN_HPP_INLINE void PipelineDeleter::operator()( Pipeline pipeline ) - { - m_device->destroyPipeline( pipeline, m_allocator ); - } - - VULKAN_HPP_INLINE void PipelineCacheDeleter::operator()( PipelineCache pipelineCache ) - { - m_device->destroyPipelineCache( pipelineCache, m_allocator ); - } - - VULKAN_HPP_INLINE void PipelineLayoutDeleter::operator()( PipelineLayout pipelineLayout ) - { - m_device->destroyPipelineLayout( pipelineLayout, m_allocator ); - } - - VULKAN_HPP_INLINE void QueryPoolDeleter::operator()( QueryPool queryPool ) - { - m_device->destroyQueryPool( queryPool, m_allocator ); - } - - VULKAN_HPP_INLINE void RenderPassDeleter::operator()( RenderPass renderPass ) - { - m_device->destroyRenderPass( renderPass, m_allocator ); - } - - VULKAN_HPP_INLINE void SamplerDeleter::operator()( Sampler sampler ) - { - m_device->destroySampler( sampler, m_allocator ); - } - - VULKAN_HPP_INLINE void SemaphoreDeleter::operator()( Semaphore semaphore ) - { - m_device->destroySemaphore( semaphore, m_allocator ); - } - - VULKAN_HPP_INLINE void ShaderModuleDeleter::operator()( ShaderModule shaderModule ) - { - m_device->destroyShaderModule( shaderModule, m_allocator ); - } - - VULKAN_HPP_INLINE void SwapchainKHRDeleter::operator()( SwapchainKHR swapchainKHR ) - { - m_device->destroySwapchainKHR( swapchainKHR, m_allocator ); + uint64_t counterValue; + Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); + return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DeviceDeleter; + using UniqueDevice = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class PhysicalDevice @@ -20220,672 +20745,221 @@ namespace vk return m_physicalDevice < rhs.m_physicalDevice; } - void getProperties( PhysicalDeviceProperties* pProperties ) const - { - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - + void getProperties( PhysicalDeviceProperties* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties getProperties() const - { - PhysicalDeviceProperties properties; - vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); - return properties; - } + PhysicalDeviceProperties getProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const - { - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - + void getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + template > + std::vector getQueueFamilyProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - + void getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties getMemoryProperties() const - { - PhysicalDeviceMemoryProperties memoryProperties; - vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - return memoryProperties; - } + PhysicalDeviceMemoryProperties getMemoryProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures( PhysicalDeviceFeatures* pFeatures ) const - { - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - + void getFeatures( PhysicalDeviceFeatures* pFeatures ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures getFeatures() const - { - PhysicalDeviceFeatures features; - vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); - return features; - } + PhysicalDeviceFeatures getFeatures() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - + void getFormatProperties( Format format, FormatProperties* pFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties getFormatProperties( Format format ) const - { - FormatProperties formatProperties; - vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - return formatProperties; - } + FormatProperties getFormatProperties( Format format ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); - } - + Result getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const - { - ImageFormatProperties imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties" ); - } + ResultValueType::type getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const - { - return static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); - } - + Result createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); - } - + ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const - { - DeviceDeleter deleter( allocator ); - return UniqueDevice( createDevice( createInfo, allocator ), deleter ); - } + UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const - { - return static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + Result enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceLayerProperties() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); - } + template > + typename ResultValueType>::type enumerateDeviceLayerProperties() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const - { - return static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + Result enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr ) const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); - } + template > + typename ResultValueType>::type enumerateDeviceExtensionProperties( Optional layerName = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const - { - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); - } - + void getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const - { - std::vector properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); - return properties; - } + template > + std::vector getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const - { - return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + Result getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPropertiesKHR() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); - } + template > + typename ResultValueType>::type getDisplayPropertiesKHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const - { - return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + Result getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlanePropertiesKHR() const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); - } + template > + typename ResultValueType>::type getDisplayPlanePropertiesKHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const - { - return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); - } - + Result getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const - { - std::vector displays; - uint32_t displayCount; - Result result; - do - { - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && displayCount ) - { - displays.resize( displayCount ); - result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( displayCount <= displays.size() ); - displays.resize( displayCount ); - return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); - } + template > + typename ResultValueType>::type getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const - { - return static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); - } - + Result getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display ) const - { - std::vector properties; - uint32_t propertyCount; - Result result; - do - { - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && propertyCount ) - { - properties.resize( propertyCount ); - result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( propertyCount <= properties.size() ); - properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); - } + template > + typename ResultValueType>::type getDisplayModePropertiesKHR( DisplayKHR display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const - { - return static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); - } - + Result createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); - } + ResultValueType::type createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const - { - return static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); - } - + Result getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const - { - DisplayPlaneCapabilitiesKHR capabilities; - Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); - return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); - } + ResultValueType::type getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const - { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); - } + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ + Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_MIR_KHR - Bool32 getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const - { - return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ + ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); - } - + Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const - { - Bool32 supported; - Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); - return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); - } + ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - + Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const - { - SurfaceCapabilitiesKHR surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); - } + template > + typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); - } - + Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfaceFormatsKHR( SurfaceKHR surface ) const - { - std::vector surfaceFormats; - uint32_t surfaceFormatCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && surfaceFormatCount ) - { - surfaceFormats.resize( surfaceFormatCount ); - result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( surfaceFormatCount <= surfaceFormats.size() ); - surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const - { - return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const - { - std::vector presentModes; - uint32_t presentModeCount; - Result result; - do - { - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && presentModeCount ) - { - presentModes.resize( presentModeCount ); - result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( presentModeCount <= presentModes.size() ); - presentModes.resize( presentModeCount ); - return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); - } + template > + typename ResultValueType>::type getSurfacePresentModesKHR( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const - { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ - + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const - { - return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); - } -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + Bool32 getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ #ifdef VK_USE_PLATFORM_WIN32_KHR - Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const - { - return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); - } + Bool32 getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const; #endif /*VK_USE_PLATFORM_WIN32_KHR*/ - #ifdef VK_USE_PLATFORM_XLIB_KHR - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const - { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); - } + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_KHR - Bool32 getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const - { - return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); - } -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - #ifdef VK_USE_PLATFORM_XCB_KHR - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const - { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); - } + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ + Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XCB_KHR - Bool32 getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const - { - return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); - } -#endif /*VK_USE_PLATFORM_XCB_KHR*/ + ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); - } - + void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const - { - ExternalImageFormatPropertiesNV externalImageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); - return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); - } + DeviceGeneratedCommandsLimitsNVX getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const - { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); - } - + void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features, DeviceGeneratedCommandsLimitsNVX & limits ) const - { - vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); - } + PhysicalDeviceFeatures2KHR getFeatures2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const - { - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); - } - + void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceFeatures2KHR getFeatures2KHR() const - { - PhysicalDeviceFeatures2KHR features; - vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); - return features; - } + PhysicalDeviceProperties2KHR getProperties2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const - { - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); - } - + void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceProperties2KHR getProperties2KHR() const - { - PhysicalDeviceProperties2KHR properties; - vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); - return properties; - } + FormatProperties2KHR getFormatProperties2KHR( Format format ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const - { - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); - } - + Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - FormatProperties2KHR getFormatProperties2KHR( Format format ) const - { - FormatProperties2KHR formatProperties; - vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); - return formatProperties; - } + ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const - { - return static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); - } - + void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const - { - ImageFormatProperties2KHR imageFormatProperties; - Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); - } + template > + std::vector getQueueFamilyProperties2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const - { - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); - } - + void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getQueueFamilyProperties2KHR() const - { - std::vector queueFamilyProperties; - uint32_t queueFamilyPropertyCount; - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); - queueFamilyProperties.resize( queueFamilyPropertyCount ); - vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); - return queueFamilyProperties; - } + PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const - { - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); - } - + void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PhysicalDeviceMemoryProperties2KHR getMemoryProperties2KHR() const - { - PhysicalDeviceMemoryProperties2KHR memoryProperties; - vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); - return memoryProperties; - } -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - void getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const - { - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const - { - std::vector properties; - uint32_t propertyCount; - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); - properties.resize( propertyCount ); - vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); - return properties; - } + template > + std::vector getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE - Result releaseDisplayEXT( DisplayKHR display ) const - { - return static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - } -#endif /*!VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type releaseDisplayEXT( DisplayKHR display ) const - { - Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); - } + Result releaseDisplayEXT( DisplayKHR display ) const; +#else + ResultValueType::type releaseDisplayEXT( DisplayKHR display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const - { - return static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - + Result acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display ) const - { - Display dpy; - Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); - return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + ResultValueType::type acquireXlibDisplayEXT( DisplayKHR display ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const - { - return static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); - } #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + Result getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput, DisplayKHR & display ) const - { - Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); - } -#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + ResultValueType::type getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ - Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const - { - return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); - } - + Result getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const - { - SurfaceCapabilities2EXT surfaceCapabilities; - Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); - } + ResultValueType::type getSurfaceCapabilities2EXT( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -20912,36 +20986,645 @@ namespace vk static_assert( sizeof( PhysicalDevice ) == sizeof( VkPhysicalDevice ), "handle and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - class DebugReportCallbackEXTDeleter + class DeviceDeleter { public: - DebugReportCallbackEXTDeleter( Instance const* instance = nullptr, Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) + DeviceDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) {} - void operator()( DebugReportCallbackEXT debugReportCallbackEXT ); + void operator()( Device device ) + { + device.destroy( m_allocator ); + } private: - Instance const* m_instance; Optional m_allocator; }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getProperties( PhysicalDeviceProperties* pProperties ) const + { + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceProperties PhysicalDevice::getProperties() const + { + PhysicalDeviceProperties properties; + vkGetPhysicalDeviceProperties( m_physicalDevice, reinterpret_cast( &properties ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties() const + { + std::vector queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties( PhysicalDeviceMemoryProperties* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties PhysicalDevice::getMemoryProperties() const + { + PhysicalDeviceMemoryProperties memoryProperties; + vkGetPhysicalDeviceMemoryProperties( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + return memoryProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures( PhysicalDeviceFeatures* pFeatures ) const + { + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( pFeatures ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceFeatures PhysicalDevice::getFeatures() const + { + PhysicalDeviceFeatures features; + vkGetPhysicalDeviceFeatures( m_physicalDevice, reinterpret_cast( &features ) ); + return features; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties( Format format, FormatProperties* pFormatProperties ) const + { + vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE FormatProperties PhysicalDevice::getFormatProperties( Format format ) const + { + FormatProperties formatProperties; + vkGetPhysicalDeviceFormatProperties( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + return formatProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ImageFormatProperties* pImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( pImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags ) const + { + ImageFormatProperties imageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::createDevice( const DeviceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Device* pDevice ) const + { + return static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pDevice ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDevice( const DeviceCreateInfo & createInfo, Optional allocator ) const + { + Device device; + Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &device ) ) ); + return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const + { + DeviceDeleter deleter( allocator ); + return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceLayerProperties( uint32_t* pPropertyCount, LayerProperties* pProperties ) const + { + return static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceLayerProperties() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkEnumerateDeviceLayerProperties( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::enumerateDeviceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, ExtensionProperties* pProperties ) const + { + return static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, pLayerName, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::enumerateDeviceExtensionProperties( Optional layerName ) const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkEnumerateDeviceExtensionProperties( m_physicalDevice, layerName ? layerName->c_str() : nullptr, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling, uint32_t* pPropertyCount, SparseImageFormatProperties* pProperties ) const + { + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), pPropertyCount, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties( Format format, ImageType type, SampleCountFlagBits samples, ImageUsageFlags usage, ImageTiling tiling ) const + { + std::vector properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( samples ), static_cast( usage ), static_cast( tiling ), &propertyCount, reinterpret_cast( properties.data() ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPropertiesKHR( uint32_t* pPropertyCount, DisplayPropertiesKHR* pProperties ) const + { + return static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPropertiesKHR() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetPhysicalDeviceDisplayPropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlanePropertiesKHR( uint32_t* pPropertyCount, DisplayPlanePropertiesKHR* pProperties ) const + { + return static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlanePropertiesKHR() const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetPhysicalDeviceDisplayPlanePropertiesKHR( m_physicalDevice, &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex, uint32_t* pDisplayCount, DisplayKHR* pDisplays ) const + { + return static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, pDisplayCount, reinterpret_cast( pDisplays ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR( uint32_t planeIndex ) const + { + std::vector displays; + uint32_t displayCount; + Result result; + do + { + result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && displayCount ) + { + displays.resize( displayCount ); + result = static_cast( vkGetDisplayPlaneSupportedDisplaysKHR( m_physicalDevice, planeIndex, &displayCount, reinterpret_cast( displays.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( displayCount <= displays.size() ); + displays.resize( displayCount ); + return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display, uint32_t* pPropertyCount, DisplayModePropertiesKHR* pProperties ) const + { + return static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), pPropertyCount, reinterpret_cast( pProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getDisplayModePropertiesKHR( DisplayKHR display ) const + { + std::vector properties; + uint32_t propertyCount; + Result result; + do + { + result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && propertyCount ) + { + properties.resize( propertyCount ); + result = static_cast( vkGetDisplayModePropertiesKHR( m_physicalDevice, static_cast( display ), &propertyCount, reinterpret_cast( properties.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( propertyCount <= properties.size() ); + properties.resize( propertyCount ); + return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, DisplayModeKHR* pMode ) const + { + return static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pMode ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDisplayModeKHR( DisplayKHR display, const DisplayModeCreateInfoKHR & createInfo, Optional allocator ) const + { + DisplayModeKHR mode; + Result result = static_cast( vkCreateDisplayModeKHR( m_physicalDevice, static_cast( display ), reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &mode ) ) ); + return createResultValue( result, mode, "vk::PhysicalDevice::createDisplayModeKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex, DisplayPlaneCapabilitiesKHR* pCapabilities ) const + { + return static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( pCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getDisplayPlaneCapabilitiesKHR( DisplayModeKHR mode, uint32_t planeIndex ) const + { + DisplayPlaneCapabilitiesKHR capabilities; + Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); + return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection* connection ) const + { + return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getMirPresentationSupportKHR( uint32_t queueFamilyIndex, MirConnection & connection ) const + { + return vkGetPhysicalDeviceMirPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface, Bool32* pSupported ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), pSupported ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceSupportKHR( uint32_t queueFamilyIndex, SurfaceKHR surface ) const + { + Bool32 supported; + Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); + return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface, SurfaceCapabilitiesKHR* pSurfaceCapabilities ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilitiesKHR( SurfaceKHR surface ) const + { + SurfaceCapabilitiesKHR surfaceCapabilities; + Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface, uint32_t* pSurfaceFormatCount, SurfaceFormatKHR* pSurfaceFormats ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), pSurfaceFormatCount, reinterpret_cast( pSurfaceFormats ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceFormatsKHR( SurfaceKHR surface ) const + { + std::vector surfaceFormats; + uint32_t surfaceFormatCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && surfaceFormatCount ) + { + surfaceFormats.resize( surfaceFormatCount ); + result = static_cast( vkGetPhysicalDeviceSurfaceFormatsKHR( m_physicalDevice, static_cast( surface ), &surfaceFormatCount, reinterpret_cast( surfaceFormats.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( surfaceFormatCount <= surfaceFormats.size() ); + surfaceFormats.resize( surfaceFormatCount ); + return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface, uint32_t* pPresentModeCount, PresentModeKHR* pPresentModes ) const + { + return static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), pPresentModeCount, reinterpret_cast( pPresentModes ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfacePresentModesKHR( SurfaceKHR surface ) const + { + std::vector presentModes; + uint32_t presentModeCount; + Result result; + do + { + result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && presentModeCount ) + { + presentModes.resize( presentModeCount ); + result = static_cast( vkGetPhysicalDeviceSurfacePresentModesKHR( m_physicalDevice, static_cast( surface ), &presentModeCount, reinterpret_cast( presentModes.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( presentModeCount <= presentModes.size() ); + presentModes.resize( presentModeCount ); + return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display* display ) const + { + return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, display ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWaylandPresentationSupportKHR( uint32_t queueFamilyIndex, struct wl_display & display ) const + { + return vkGetPhysicalDeviceWaylandPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &display ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getWin32PresentationSupportKHR( uint32_t queueFamilyIndex ) const + { + return vkGetPhysicalDeviceWin32PresentationSupportKHR( m_physicalDevice, queueFamilyIndex ); + } +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + +#ifdef VK_USE_PLATFORM_XLIB_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ) const + { + return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, dpy, visualID ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXlibPresentationSupportKHR( uint32_t queueFamilyIndex, Display & dpy, VisualID visualID ) const + { + return vkGetPhysicalDeviceXlibPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &dpy, visualID ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + +#ifdef VK_USE_PLATFORM_XCB_KHR + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ) const + { + return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, connection, visual_id ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Bool32 PhysicalDevice::getXcbPresentationSupportKHR( uint32_t queueFamilyIndex, xcb_connection_t & connection, xcb_visualid_t visual_id ) const + { + return vkGetPhysicalDeviceXcbPresentationSupportKHR( m_physicalDevice, queueFamilyIndex, &connection, visual_id ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType, ExternalImageFormatPropertiesNV* pExternalImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( pExternalImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getExternalImageFormatPropertiesNV( Format format, ImageType type, ImageTiling tiling, ImageUsageFlags usage, ImageCreateFlags flags, ExternalMemoryHandleTypeFlagsNV externalHandleType ) const + { + ExternalImageFormatPropertiesNV externalImageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceExternalImageFormatPropertiesNV( m_physicalDevice, static_cast( format ), static_cast( type ), static_cast( tiling ), static_cast( usage ), static_cast( flags ), static_cast( externalHandleType ), reinterpret_cast( &externalImageFormatProperties ) ) ); + return createResultValue( result, externalImageFormatProperties, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX* pFeatures, DeviceGeneratedCommandsLimitsNVX* pLimits ) const + { + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( pFeatures ), reinterpret_cast( pLimits ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE DeviceGeneratedCommandsLimitsNVX PhysicalDevice::getGeneratedCommandsPropertiesNVX( DeviceGeneratedCommandsFeaturesNVX & features ) const + { + DeviceGeneratedCommandsLimitsNVX limits; + vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( m_physicalDevice, reinterpret_cast( &features ), reinterpret_cast( &limits ) ); + return limits; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const + { + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( pFeatures ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceFeatures2KHR PhysicalDevice::getFeatures2KHR() const + { + PhysicalDeviceFeatures2KHR features; + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); + return features; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceProperties2KHR PhysicalDevice::getProperties2KHR() const + { + PhysicalDeviceProperties2KHR properties; + vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const + { + vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( pFormatProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE FormatProperties2KHR PhysicalDevice::getFormatProperties2KHR( Format format ) const + { + FormatProperties2KHR formatProperties; + vkGetPhysicalDeviceFormatProperties2KHR( m_physicalDevice, static_cast( format ), reinterpret_cast( &formatProperties ) ); + return formatProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const + { + return static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pImageFormatInfo ), reinterpret_cast( pImageFormatProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const + { + ImageFormatProperties2KHR imageFormatProperties; + Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); + return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const + { + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, pQueueFamilyPropertyCount, reinterpret_cast( pQueueFamilyProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getQueueFamilyProperties2KHR() const + { + std::vector queueFamilyProperties; + uint32_t queueFamilyPropertyCount; + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, nullptr ); + queueFamilyProperties.resize( queueFamilyPropertyCount ); + vkGetPhysicalDeviceQueueFamilyProperties2KHR( m_physicalDevice, &queueFamilyPropertyCount, reinterpret_cast( queueFamilyProperties.data() ) ); + return queueFamilyProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getMemoryProperties2KHR( PhysicalDeviceMemoryProperties2KHR* pMemoryProperties ) const + { + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( pMemoryProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PhysicalDeviceMemoryProperties2KHR PhysicalDevice::getMemoryProperties2KHR() const + { + PhysicalDeviceMemoryProperties2KHR memoryProperties; + vkGetPhysicalDeviceMemoryProperties2KHR( m_physicalDevice, reinterpret_cast( &memoryProperties ) ); + return memoryProperties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, SparseImageFormatProperties2KHR* pProperties ) const + { + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( pFormatInfo ), pPropertyCount, reinterpret_cast( pProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE std::vector PhysicalDevice::getSparseImageFormatProperties2KHR( const PhysicalDeviceSparseImageFormatInfo2KHR & formatInfo ) const + { + std::vector properties; + uint32_t propertyCount; + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, nullptr ); + properties.resize( propertyCount ); + vkGetPhysicalDeviceSparseImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &formatInfo ), &propertyCount, reinterpret_cast( properties.data() ) ); + return properties; + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE Result PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + return static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + } +#else + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const + { + Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); + return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::acquireXlibDisplayEXT( Display* dpy, DisplayKHR display ) const + { + return static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, dpy, static_cast( display ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::acquireXlibDisplayEXT( DisplayKHR display ) const + { + Display dpy; + Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); + return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + VULKAN_HPP_INLINE Result PhysicalDevice::getRandROutputDisplayEXT( Display* dpy, RROutput rrOutput, DisplayKHR* pDisplay ) const + { + return static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, dpy, rrOutput, reinterpret_cast( pDisplay ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getRandROutputDisplayEXT( Display & dpy, RROutput rrOutput ) const + { + DisplayKHR display; + Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); + return createResultValue( result, display, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ + + VULKAN_HPP_INLINE Result PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface, SurfaceCapabilities2EXT* pSurfaceCapabilities ) const + { + return static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( pSurfaceCapabilities ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::getSurfaceCapabilities2EXT( SurfaceKHR surface ) const + { + SurfaceCapabilities2EXT surfaceCapabilities; + Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); + return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class DebugReportCallbackEXTDeleter; using UniqueDebugReportCallbackEXT = UniqueHandle; - - class SurfaceKHRDeleter - { - public: - SurfaceKHRDeleter( Instance const* instance = nullptr, Optional allocator = nullptr ) - : m_instance( instance ) - , m_allocator( allocator ) - {} - - void operator()( SurfaceKHR surfaceKHR ); - - private: - Instance const* m_instance; - Optional m_allocator; - }; + class SurfaceKHRDeleter; using UniqueSurfaceKHR = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ @@ -20979,325 +21662,121 @@ namespace vk return m_instance < rhs.m_instance; } - void destroy( const AllocationCallbacks* pAllocator ) const - { - vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); - } - + void destroy( const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroy( Optional allocator = nullptr ) const - { - vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator)) ); - } + void destroy( Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const - { - return static_cast( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); - } - + Result enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - template > - typename ResultValueType>::type enumeratePhysicalDevices() const - { - std::vector physicalDevices; - uint32_t physicalDeviceCount; - Result result; - do - { - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); - if ( ( result == Result::eSuccess ) && physicalDeviceCount ) - { - physicalDevices.resize( physicalDeviceCount ); - result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); - } - } while ( result == Result::eIncomplete ); - assert( physicalDeviceCount <= physicalDevices.size() ); - physicalDevices.resize( physicalDeviceCount ); - return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); - } + template > + typename ResultValueType>::type enumeratePhysicalDevices() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - PFN_vkVoidFunction getProcAddr( const char* pName ) const - { - return vkGetInstanceProcAddr( m_instance, pName ); - } - + PFN_vkVoidFunction getProcAddr( const char* pName ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - PFN_vkVoidFunction getProcAddr( const std::string & name ) const - { - return vkGetInstanceProcAddr( m_instance, name.c_str() ); - } + PFN_vkVoidFunction getProcAddr( const std::string & name ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_ANDROID_KHR - Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - + Result createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_ANDROID_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); - } - + ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); - } + UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ - Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } - + Result createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); - } - + ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); - } + UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_MIR_KHR - Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } -#endif /*VK_USE_PLATFORM_MIR_KHR*/ - + Result createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_MIR_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); - } - + ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); - } + UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_MIR_KHR*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ - void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const - { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); - } - + void destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const - { - vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator)) ); - } + void destroySurfaceKHR( SurfaceKHR surface, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_VI_NN - Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } + Result createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_VI_NN*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_VI_NN - ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHR surface; - Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); - } - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_VI_NN*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - #ifdef VK_USE_PLATFORM_WAYLAND_KHR - Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } + Result createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); - } - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - #ifdef VK_USE_PLATFORM_WIN32_KHR - Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } + Result createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_WIN32_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); - } - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_WIN32_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - #ifdef VK_USE_PLATFORM_XLIB_KHR - Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } + Result createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XLIB_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); - } - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_XLIB_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - #ifdef VK_USE_PLATFORM_XCB_KHR - Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const - { - return static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); - } + Result createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ + Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE -#ifdef VK_USE_PLATFORM_XCB_KHR - ResultValueType::type 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 ) ) ); - return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); - } - + ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const - { - SurfaceKHRDeleter deleter( this, allocator ); - return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ -#endif /*VK_USE_PLATFORM_XCB_KHR*/ -#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - - Result createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const - { - return static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); - } - -#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type 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 ) ) ); - return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); - } - -#ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const - { - DebugReportCallbackEXTDeleter deleter( this, allocator ); - return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); - } + UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const - { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); - } - + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const - { - vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator)) ); - } + void destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const - { - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); - } - + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const - { -#ifdef VULKAN_HPP_NO_EXCEPTIONS - assert( layerPrefix.size() == message.size() ); -#else - if ( layerPrefix.size() != message.size() ) - { - throw std::logic_error( "vk::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); - } -#endif // VULKAN_HPP_NO_EXCEPTIONS - vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); - } + void debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #if !defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -21324,17 +21803,325 @@ namespace vk static_assert( sizeof( Instance ) == sizeof( VkInstance ), "handle and wrapper have different size!" ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE void DebugReportCallbackEXTDeleter::operator()( DebugReportCallbackEXT debugReportCallbackEXT ) + class DebugReportCallbackEXTDeleter { - m_instance->destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); - } + public: + DebugReportCallbackEXTDeleter( Instance instance = Instance(), Optional allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) + {} - VULKAN_HPP_INLINE void SurfaceKHRDeleter::operator()( SurfaceKHR surfaceKHR ) + void operator()( DebugReportCallbackEXT debugReportCallbackEXT ) + { + m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); + } + + private: + Instance m_instance; + Optional m_allocator; + }; + + class SurfaceKHRDeleter { - m_instance->destroySurfaceKHR( surfaceKHR, m_allocator ); - } + public: + SurfaceKHRDeleter( Instance instance = Instance(), Optional allocator = nullptr ) + : m_instance( instance ) + , m_allocator( allocator ) + {} + + void operator()( SurfaceKHR surfaceKHR ) + { + m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); + } + + private: + Instance m_instance; + Optional m_allocator; + }; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + VULKAN_HPP_INLINE void Instance::destroy( const AllocationCallbacks* pAllocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroy( Optional allocator ) const + { + vkDestroyInstance( m_instance, reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Instance::enumeratePhysicalDevices( uint32_t* pPhysicalDeviceCount, PhysicalDevice* pPhysicalDevices ) const + { + return static_cast( vkEnumeratePhysicalDevices( m_instance, pPhysicalDeviceCount, reinterpret_cast( pPhysicalDevices ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Instance::enumeratePhysicalDevices() const + { + std::vector physicalDevices; + uint32_t physicalDeviceCount; + Result result; + do + { + result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && physicalDeviceCount ) + { + physicalDevices.resize( physicalDeviceCount ); + result = static_cast( vkEnumeratePhysicalDevices( m_instance, &physicalDeviceCount, reinterpret_cast( physicalDevices.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( physicalDeviceCount <= physicalDevices.size() ); + physicalDevices.resize( physicalDeviceCount ); + return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const char* pName ) const + { + return vkGetInstanceProcAddr( m_instance, pName ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE PFN_vkVoidFunction Instance::getProcAddr( const std::string & name ) const + { + return vkGetInstanceProcAddr( m_instance, name.c_str() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_ANDROID_KHR + VULKAN_HPP_INLINE Result Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_ANDROID_KHR*/ + + VULKAN_HPP_INLINE Result Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_MIR_KHR + VULKAN_HPP_INLINE Result Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_MIR_KHR*/ + + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, const AllocationCallbacks* pAllocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroySurfaceKHR( SurfaceKHR surface, Optional allocator ) const + { + vkDestroySurfaceKHR( m_instance, static_cast( surface ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifdef VK_USE_PLATFORM_VI_NN + VULKAN_HPP_INLINE Result Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_VI_NN*/ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + VULKAN_HPP_INLINE Result Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ + +#ifdef VK_USE_PLATFORM_WIN32_KHR + VULKAN_HPP_INLINE Result Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + +#ifdef VK_USE_PLATFORM_XLIB_KHR + VULKAN_HPP_INLINE Result Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XLIB_KHR*/ + +#ifdef VK_USE_PLATFORM_XCB_KHR + VULKAN_HPP_INLINE Result Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SurfaceKHR* pSurface ) const + { + return static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pSurface ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHR surface; + Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &surface ) ) ); + return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + { + SurfaceKHRDeleter deleter( *this, allocator ); + return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ +#endif /*VK_USE_PLATFORM_XCB_KHR*/ + + VULKAN_HPP_INLINE Result Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, DebugReportCallbackEXT* pCallback ) const + { + return static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pCallback ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + { + DebugReportCallbackEXT callback; + Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &callback ) ) ); + return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + { + DebugReportCallbackEXTDeleter deleter( *this, allocator ); + return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, const AllocationCallbacks* pAllocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::destroyDebugReportCallbackEXT( DebugReportCallbackEXT callback, Optional allocator ) const + { + vkDestroyDebugReportCallbackEXT( m_instance, static_cast( callback ), reinterpret_cast( static_cast( allocator)) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage ) const + { + vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, pLayerPrefix, pMessage ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Instance::debugReportMessageEXT( DebugReportFlagsEXT flags, DebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const std::string & layerPrefix, const std::string & message ) const + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( layerPrefix.size() == message.size() ); +#else + if ( layerPrefix.size() != message.size() ) + { + throw std::logic_error( "vk::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); + } +#endif // VULKAN_HPP_NO_EXCEPTIONS + vkDebugReportMessageEXT( m_instance, static_cast( flags ), static_cast( objectType ), object, location, messageCode, layerPrefix.c_str(), message.c_str() ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ struct CmdProcessCommandsInfoNVX { CmdProcessCommandsInfoNVX( ObjectTableNVX objectTable_ = ObjectTableNVX(), IndirectCommandsLayoutNVX indirectCommandsLayout_ = IndirectCommandsLayoutNVX(), uint32_t indirectCommandsTokenCount_ = 0, const IndirectCommandsTokenNVX* pIndirectCommandsTokens_ = nullptr, uint32_t maxSequencesCount_ = 0, CommandBuffer targetCommandBuffer_ = CommandBuffer(), Buffer sequencesCountBuffer_ = Buffer(), DeviceSize sequencesCountOffset_ = 0, Buffer sequencesIndexBuffer_ = Buffer(), DeviceSize sequencesIndexOffset_ = 0 ) @@ -21474,21 +22261,50 @@ namespace vk }; static_assert( sizeof( CmdProcessCommandsInfoNVX ) == sizeof( VkCmdProcessCommandsInfoNVX ), "struct and wrapper have different size!" ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class InstanceDeleter; + using UniqueInstance = UniqueHandle; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + + Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ); +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); +#ifndef VULKAN_HPP_NO_SMART_HANDLE + UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + +#ifndef VULKAN_HPP_NO_SMART_HANDLE + class InstanceDeleter + { + public: + InstanceDeleter( Optional allocator = nullptr ) + : m_allocator( allocator ) + {} + + void operator()( Instance instance ) + { + instance.destroy( m_allocator ); + } + + private: + Optional m_allocator; + }; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ + VULKAN_HPP_INLINE Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ) { return static_cast( vkCreateInstance( reinterpret_cast( pCreateInfo ), reinterpret_cast( pAllocator ), reinterpret_cast( pInstance ) ) ); } - #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ) + VULKAN_HPP_INLINE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator ) { Instance instance; Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator)), reinterpret_cast( &instance ) ) ); return createResultValue( result, instance, "vk::createInstance" ); } - #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ) + VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) { InstanceDeleter deleter( allocator ); return UniqueInstance( createInstance( createInfo, allocator ), deleter ); @@ -21496,18 +22312,6 @@ namespace vk #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -#ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE void DeviceDeleter::operator()( Device device ) - { - device.destroy( m_allocator ); - } - - VULKAN_HPP_INLINE void InstanceDeleter::operator()( Instance instance ) - { - instance.destroy( m_allocator ); - } -#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ - VULKAN_HPP_INLINE std::string to_string(FramebufferCreateFlagBits) { return "(void)";