mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Added overload of enhanced functions using std::initializer_list instead of std::vector
This commit is contained in:
parent
29e7f3ae6b
commit
c5bcc9410c
@ -350,6 +350,13 @@ struct VkData
|
|||||||
std::string vulkanLicenseHeader;
|
std::string vulkanLicenseHeader;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class FunctionType
|
||||||
|
{
|
||||||
|
standard,
|
||||||
|
singular,
|
||||||
|
initializerList
|
||||||
|
};
|
||||||
|
|
||||||
void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues );
|
void createDefaults( VkData const& vkData, std::map<std::string,std::string> & defaultValues );
|
||||||
std::string determineFunctionName(std::string const& name, CommandData const& commandData);
|
std::string determineFunctionName(std::string const& name, CommandData const& commandData);
|
||||||
std::string determineReturnType(CommandData const& commandData, size_t returnIndex, bool isVector = false);
|
std::string determineReturnType(CommandData const& commandData, size_t returnIndex, bool isVector = false);
|
||||||
@ -391,11 +398,11 @@ std::string strip(std::string const& value, std::string const& prefix, std::stri
|
|||||||
std::string stripCommand(std::string const& value);
|
std::string stripCommand(std::string const& value);
|
||||||
std::string toCamelCase(std::string const& value);
|
std::string toCamelCase(std::string const& value);
|
||||||
std::string toUpperCase(std::string const& name);
|
std::string toUpperCase(std::string const& name);
|
||||||
void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set<std::string> const& vkTypes, std::map<size_t, size_t> const& vectorParameters, size_t returnIndex, bool firstCall, bool singular);
|
void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set<std::string> const& vkTypes, std::map<size_t, size_t> const& vectorParameters, size_t returnIndex, bool firstCall, FunctionType ft);
|
||||||
void writeEnumsToString(std::ofstream & ofs, VkData const& vkData);
|
void writeEnumsToString(std::ofstream & ofs, VkData const& vkData);
|
||||||
void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::vector<std::string> const& successCodes);
|
void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::vector<std::string> const& successCodes);
|
||||||
void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set<std::string> const& vkTypes, size_t returnIndex, std::map<size_t, size_t> const& vectorParameters, bool singular);
|
void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set<std::string> const& vkTypes, size_t returnIndex, std::map<size_t, size_t> const& vectorParameters, FunctionType ft);
|
||||||
void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map<size_t, size_t> const& vectorParameters, bool singular);
|
void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map<size_t, size_t> const& vectorParameters, FunctionType ft);
|
||||||
void writeMemberData(std::ofstream & ofs, MemberData const& memberData, std::set<std::string> const& vkTypes);
|
void writeMemberData(std::ofstream & ofs, MemberData const& memberData, std::set<std::string> const& vkTypes);
|
||||||
void writeStructConstructor( std::ofstream & ofs, std::string const& name, std::string const& memberName, StructData const& structData, std::set<std::string> const& vkTypes, std::map<std::string,std::string> const& defaultValues );
|
void writeStructConstructor( std::ofstream & ofs, std::string const& name, std::string const& memberName, StructData const& structData, std::set<std::string> const& vkTypes, std::map<std::string,std::string> const& defaultValues );
|
||||||
void writeStructGetter( std::ofstream & ofs, MemberData const& memberData, std::string const& memberName, std::set<std::string> const& vkTypes, bool constVersion );
|
void writeStructGetter( std::ofstream & ofs, MemberData const& memberData, std::string const& memberName, std::set<std::string> const& vkTypes, bool constVersion );
|
||||||
@ -1550,7 +1557,7 @@ std::string toUpperCase(std::string const& name)
|
|||||||
return convertedName;
|
return convertedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set<std::string> const& vkTypes, std::map<size_t, size_t> const& vectorParameters, size_t returnIndex, bool firstCall, bool singular)
|
void writeCall(std::ofstream & ofs, std::string const& name, size_t templateIndex, CommandData const& commandData, std::set<std::string> const& vkTypes, std::map<size_t, size_t> const& vectorParameters, size_t returnIndex, bool firstCall, FunctionType ft)
|
||||||
{
|
{
|
||||||
std::map<size_t,size_t> countIndices;
|
std::map<size_t,size_t> countIndices;
|
||||||
for (std::map<size_t, size_t>::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it)
|
for (std::map<size_t, size_t>::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it)
|
||||||
@ -1587,7 +1594,7 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (singular)
|
if (ft == FunctionType::singular)
|
||||||
{
|
{
|
||||||
if (templateIndex == it->second)
|
if (templateIndex == it->second)
|
||||||
{
|
{
|
||||||
@ -1634,15 +1641,19 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde
|
|||||||
ofs << "Vk";
|
ofs << "Vk";
|
||||||
}
|
}
|
||||||
ofs << commandData.arguments[it->first].pureType << "*>( ";
|
ofs << commandData.arguments[it->first].pureType << "*>( ";
|
||||||
if (singular)
|
if (ft == FunctionType::singular)
|
||||||
{
|
{
|
||||||
ofs << "&";
|
ofs << "&";
|
||||||
}
|
}
|
||||||
ofs << reduceName(commandData.arguments[it->first].name, singular);
|
ofs << reduceName(commandData.arguments[it->first].name, ft == FunctionType::singular);
|
||||||
if (!singular)
|
if ((ft == FunctionType::standard) || ((ft != FunctionType::singular) && (it->first == returnIndex)))
|
||||||
{
|
{
|
||||||
ofs << ".data()";
|
ofs << ".data()";
|
||||||
}
|
}
|
||||||
|
else if (ft == FunctionType::initializerList)
|
||||||
|
{
|
||||||
|
ofs << ".begin()";
|
||||||
|
}
|
||||||
ofs << " )";
|
ofs << " )";
|
||||||
}
|
}
|
||||||
else if (commandData.arguments[it->first].pureType == "char")
|
else if (commandData.arguments[it->first].pureType == "char")
|
||||||
@ -1659,14 +1670,21 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (singular)
|
if (ft == FunctionType::singular)
|
||||||
{
|
{
|
||||||
ofs << "&";
|
ofs << "&";
|
||||||
}
|
}
|
||||||
ofs << reduceName(commandData.arguments[it->first].name, singular);
|
ofs << reduceName(commandData.arguments[it->first].name, ft == FunctionType::singular);
|
||||||
if (!singular)
|
switch (ft)
|
||||||
{
|
{
|
||||||
ofs << ".data()";
|
case FunctionType::initializerList:
|
||||||
|
ofs << ".begin()";
|
||||||
|
break;
|
||||||
|
case FunctionType::standard:
|
||||||
|
ofs << ".data()";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1754,7 +1772,7 @@ void writeExceptionCheck(std::ofstream & ofs, std::string const& indentation, st
|
|||||||
<< indentation << " }" << std::endl;
|
<< indentation << " }" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set<std::string> const& vkTypes, size_t returnIndex, std::map<size_t, size_t> const& vectorParameters, bool singular)
|
void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std::string const& className, std::string const& functionName, std::string const& returnType, size_t templateIndex, DependencyData const& dependencyData, CommandData const& commandData, std::set<std::string> const& vkTypes, size_t returnIndex, std::map<size_t, size_t> const& vectorParameters, FunctionType ft)
|
||||||
{
|
{
|
||||||
ofs << indentation << "{" << std::endl;
|
ofs << indentation << "{" << std::endl;
|
||||||
|
|
||||||
@ -1765,7 +1783,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add some error checks if multiple vectors need to have the same size
|
// add some error checks if multiple vectors need to have the same size
|
||||||
if (!singular && (1 < vectorParameters.size()))
|
if ((ft != FunctionType::singular) && (1 < vectorParameters.size()))
|
||||||
{
|
{
|
||||||
for (std::map<size_t, size_t>::const_iterator it0 = vectorParameters.begin(); it0 != vectorParameters.end(); ++it0)
|
for (std::map<size_t, size_t>::const_iterator it0 = vectorParameters.begin(); it0 != vectorParameters.end(); ++it0)
|
||||||
{
|
{
|
||||||
@ -1788,9 +1806,9 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
// write the local variable to hold a returned value
|
// write the local variable to hold a returned value
|
||||||
if ((returnIndex != ~0) && (commandData.returnType != returnType))
|
if ((returnIndex != ~0) && (commandData.returnType != returnType))
|
||||||
{
|
{
|
||||||
ofs << indentation << " " << (singular ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(commandData.arguments[returnIndex].name, singular);
|
ofs << indentation << " " << ((ft == FunctionType::singular) ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(commandData.arguments[returnIndex].name, ft == FunctionType::singular);
|
||||||
|
|
||||||
if (!singular)
|
if (ft != FunctionType::singular)
|
||||||
{
|
{
|
||||||
std::map<size_t, size_t>::const_iterator it = vectorParameters.find(returnIndex);
|
std::map<size_t, size_t>::const_iterator it = vectorParameters.find(returnIndex);
|
||||||
if (it != vectorParameters.end() && !commandData.twoStep)
|
if (it != vectorParameters.end() && !commandData.twoStep)
|
||||||
@ -1855,7 +1873,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
assert(!commandData.twoStep);
|
assert(!commandData.twoStep);
|
||||||
ofs << "return ";
|
ofs << "return ";
|
||||||
}
|
}
|
||||||
writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, true, singular);
|
writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, true, ft);
|
||||||
if (commandData.returnType == "Result")
|
if (commandData.returnType == "Result")
|
||||||
{
|
{
|
||||||
ofs << " )";
|
ofs << " )";
|
||||||
@ -1889,7 +1907,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
{
|
{
|
||||||
ofs << indentation << " ";
|
ofs << indentation << " ";
|
||||||
}
|
}
|
||||||
writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, false, singular);
|
writeCall(ofs, dependencyData.name, templateIndex, commandData, vkTypes, vectorParameters, returnIndex, false, ft);
|
||||||
if (commandData.returnType == "Result")
|
if (commandData.returnType == "Result")
|
||||||
{
|
{
|
||||||
ofs << " )";
|
ofs << " )";
|
||||||
@ -1913,7 +1931,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
// return the returned value
|
// return the returned value
|
||||||
if ((returnIndex != ~0) && (commandData.returnType != returnType))
|
if ((returnIndex != ~0) && (commandData.returnType != returnType))
|
||||||
{
|
{
|
||||||
ofs << indentation << " return " << reduceName(commandData.arguments[returnIndex].name, singular) << ";" << std::endl;
|
ofs << indentation << " return " << reduceName(commandData.arguments[returnIndex].name, ft == FunctionType::singular) << ";" << std::endl;
|
||||||
}
|
}
|
||||||
else if (returnType == "Result")
|
else if (returnType == "Result")
|
||||||
{
|
{
|
||||||
@ -1923,7 +1941,7 @@ void writeFunctionBody(std::ofstream & ofs, std::string const& indentation, std:
|
|||||||
ofs << indentation << "}" << std::endl;
|
ofs << indentation << "}" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map<size_t, size_t> const& vectorParameters, bool singular)
|
void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, std::string const& returnType, std::string const& name, CommandData const& commandData, size_t returnIndex, size_t templateIndex, std::map<size_t, size_t> const& vectorParameters, FunctionType ft)
|
||||||
{
|
{
|
||||||
std::set<size_t> skippedArguments;
|
std::set<size_t> skippedArguments;
|
||||||
for (std::map<size_t, size_t>::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it)
|
for (std::map<size_t, size_t>::const_iterator it = vectorParameters.begin(); it != vectorParameters.end(); ++it)
|
||||||
@ -1954,7 +1972,7 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st
|
|||||||
{
|
{
|
||||||
ofs << "inline ";
|
ofs << "inline ";
|
||||||
}
|
}
|
||||||
ofs << ((singular && (returnIndex != ~0)) ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(name, singular) << "(";
|
ofs << (((ft == FunctionType::singular) && (returnIndex != ~0)) ? commandData.arguments[returnIndex].pureType : returnType) << " " << reduceName(name, ft == FunctionType::singular) << "(";
|
||||||
if (skippedArguments.size() + (commandData.handleCommand ? 1 : 0) < commandData.arguments.size())
|
if (skippedArguments.size() + (commandData.handleCommand ? 1 : 0) < commandData.arguments.size())
|
||||||
{
|
{
|
||||||
size_t lastArgument = ~0;
|
size_t lastArgument = ~0;
|
||||||
@ -2012,23 +2030,39 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st
|
|||||||
{
|
{
|
||||||
if (templateIndex == i)
|
if (templateIndex == i)
|
||||||
{
|
{
|
||||||
ofs << (singular ? "T" : "std::vector<T>");
|
switch (ft)
|
||||||
|
{
|
||||||
|
case FunctionType::initializerList :
|
||||||
|
ofs << "std::initializer_list<T>";
|
||||||
|
break;
|
||||||
|
case FunctionType::singular :
|
||||||
|
ofs << "T";
|
||||||
|
break;
|
||||||
|
case FunctionType::standard :
|
||||||
|
ofs << "std::vector<T>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (commandData.arguments[i].pureType == "char")
|
else if (commandData.arguments[i].pureType == "char")
|
||||||
{
|
{
|
||||||
ofs << "std::string";
|
ofs << "std::string";
|
||||||
}
|
}
|
||||||
else if (commandData.arguments[i].pureType == "void")
|
|
||||||
{
|
|
||||||
ofs << "std::vector<uint8_t>";
|
|
||||||
}
|
|
||||||
else if (singular)
|
|
||||||
{
|
|
||||||
ofs << commandData.arguments[i].pureType;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ofs << "std::vector<" << commandData.arguments[i].pureType << ">";
|
switch (ft)
|
||||||
|
{
|
||||||
|
case FunctionType::initializerList :
|
||||||
|
ofs << "std::initializer_list<";
|
||||||
|
break;
|
||||||
|
case FunctionType::standard :
|
||||||
|
ofs << "std::vector<";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ofs << commandData.arguments[i].pureType;
|
||||||
|
if (ft != FunctionType::singular)
|
||||||
|
{
|
||||||
|
ofs << ">";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (commandData.arguments[i].type.find("const") != std::string::npos)
|
if (commandData.arguments[i].type.find("const") != std::string::npos)
|
||||||
{
|
{
|
||||||
@ -2039,7 +2073,7 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st
|
|||||||
{
|
{
|
||||||
ofs << "> const";
|
ofs << "> const";
|
||||||
}
|
}
|
||||||
ofs << " & " << reduceName(commandData.arguments[i].name, singular);
|
ofs << " & " << reduceName(commandData.arguments[i].name, ft == FunctionType::singular);
|
||||||
if (optional && (i == lastArgument))
|
if (optional && (i == lastArgument))
|
||||||
{
|
{
|
||||||
ofs << " = nullptr";
|
ofs << " = nullptr";
|
||||||
@ -2340,13 +2374,16 @@ void writeTypeCommandEnhanced(std::ofstream & ofs, std::string const& indentatio
|
|||||||
std::map<size_t, size_t>::const_iterator returnVector = vectorParameters.find(returnIndex);
|
std::map<size_t, size_t>::const_iterator returnVector = vectorParameters.find(returnIndex);
|
||||||
std::string returnType = determineReturnType(commandData, returnIndex, returnVector != vectorParameters.end());
|
std::string returnType = determineReturnType(commandData, returnIndex, returnVector != vectorParameters.end());
|
||||||
|
|
||||||
writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, false);
|
writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::standard);
|
||||||
writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, false);
|
writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::standard);
|
||||||
if (hasSizedVectorParameter(vectorParameters, returnIndex))
|
if (hasSizedVectorParameter(vectorParameters, returnIndex))
|
||||||
{
|
{
|
||||||
ofs << std::endl;
|
ofs << std::endl;
|
||||||
writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, true);
|
writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::initializerList);
|
||||||
writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, true);
|
writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::initializerList);
|
||||||
|
ofs << std::endl;
|
||||||
|
writeFunctionHeader(ofs, indentation, returnType, functionName, commandData, returnIndex, templateIndex, vectorParameters, FunctionType::singular);
|
||||||
|
writeFunctionBody(ofs, indentation, className, functionName, returnType, templateIndex, dependencyData, commandData, vkTypes, returnIndex, vectorParameters, FunctionType::singular);
|
||||||
}
|
}
|
||||||
leaveProtect(ofs, commandData.protect);
|
leaveProtect(ofs, commandData.protect);
|
||||||
}
|
}
|
||||||
|
@ -17657,6 +17657,11 @@ namespace vk
|
|||||||
vkCmdSetViewport( m_commandBuffer, firstViewport, static_cast<uint32_t>( viewports.size() ), reinterpret_cast<const VkViewport*>( viewports.data() ) );
|
vkCmdSetViewport( m_commandBuffer, firstViewport, static_cast<uint32_t>( viewports.size() ), reinterpret_cast<const VkViewport*>( viewports.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setViewport( uint32_t firstViewport, std::initializer_list<Viewport> const & viewports ) const
|
||||||
|
{
|
||||||
|
vkCmdSetViewport( m_commandBuffer, firstViewport, static_cast<uint32_t>( viewports.size() ), reinterpret_cast<const VkViewport*>( viewports.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void setViewport( uint32_t firstViewport, Viewport const & viewport ) const
|
void setViewport( uint32_t firstViewport, Viewport const & viewport ) const
|
||||||
{
|
{
|
||||||
vkCmdSetViewport( m_commandBuffer, firstViewport, 1, reinterpret_cast<const VkViewport*>( &viewport ) );
|
vkCmdSetViewport( m_commandBuffer, firstViewport, 1, reinterpret_cast<const VkViewport*>( &viewport ) );
|
||||||
@ -17674,6 +17679,11 @@ namespace vk
|
|||||||
vkCmdSetScissor( m_commandBuffer, firstScissor, static_cast<uint32_t>( scissors.size() ), reinterpret_cast<const VkRect2D*>( scissors.data() ) );
|
vkCmdSetScissor( m_commandBuffer, firstScissor, static_cast<uint32_t>( scissors.size() ), reinterpret_cast<const VkRect2D*>( scissors.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setScissor( uint32_t firstScissor, std::initializer_list<Rect2D> const & scissors ) const
|
||||||
|
{
|
||||||
|
vkCmdSetScissor( m_commandBuffer, firstScissor, static_cast<uint32_t>( scissors.size() ), reinterpret_cast<const VkRect2D*>( scissors.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void setScissor( uint32_t firstScissor, Rect2D const & scissor ) const
|
void setScissor( uint32_t firstScissor, Rect2D const & scissor ) const
|
||||||
{
|
{
|
||||||
vkCmdSetScissor( m_commandBuffer, firstScissor, 1, reinterpret_cast<const VkRect2D*>( &scissor ) );
|
vkCmdSetScissor( m_commandBuffer, firstScissor, 1, reinterpret_cast<const VkRect2D*>( &scissor ) );
|
||||||
@ -17789,6 +17799,11 @@ namespace vk
|
|||||||
vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, static_cast<uint32_t>( descriptorSets.size() ), reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), static_cast<uint32_t>( dynamicOffsets.size() ), dynamicOffsets.data() );
|
vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, static_cast<uint32_t>( descriptorSets.size() ), reinterpret_cast<const VkDescriptorSet*>( descriptorSets.data() ), static_cast<uint32_t>( dynamicOffsets.size() ), dynamicOffsets.data() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bindDescriptorSets( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, std::initializer_list<DescriptorSet> const & descriptorSets, std::initializer_list<uint32_t> const & dynamicOffsets ) const
|
||||||
|
{
|
||||||
|
vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, static_cast<uint32_t>( descriptorSets.size() ), reinterpret_cast<const VkDescriptorSet*>( descriptorSets.begin() ), static_cast<uint32_t>( dynamicOffsets.size() ), dynamicOffsets.begin() );
|
||||||
|
}
|
||||||
|
|
||||||
void bindDescriptorSet( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, DescriptorSet const & descriptorSet, uint32_t const & dynamicOffset ) const
|
void bindDescriptorSet( PipelineBindPoint pipelineBindPoint, PipelineLayout layout, uint32_t firstSet, DescriptorSet const & descriptorSet, uint32_t const & dynamicOffset ) const
|
||||||
{
|
{
|
||||||
vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, 1, reinterpret_cast<const VkDescriptorSet*>( &descriptorSet ), 1, &dynamicOffset );
|
vkCmdBindDescriptorSets( m_commandBuffer, static_cast<VkPipelineBindPoint>( pipelineBindPoint ), static_cast<VkPipelineLayout>( layout ), firstSet, 1, reinterpret_cast<const VkDescriptorSet*>( &descriptorSet ), 1, &dynamicOffset );
|
||||||
@ -17824,6 +17839,15 @@ namespace vk
|
|||||||
vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, static_cast<uint32_t>( buffers.size() ), reinterpret_cast<const VkBuffer*>( buffers.data() ), offsets.data() );
|
vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, static_cast<uint32_t>( buffers.size() ), reinterpret_cast<const VkBuffer*>( buffers.data() ), offsets.data() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bindVertexBuffers( uint32_t firstBinding, std::initializer_list<Buffer> const & buffers, std::initializer_list<DeviceSize> const & offsets ) const
|
||||||
|
{
|
||||||
|
if ( buffers.size() != offsets.size() )
|
||||||
|
{
|
||||||
|
throw std::logic_error( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" );
|
||||||
|
}
|
||||||
|
vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, static_cast<uint32_t>( buffers.size() ), reinterpret_cast<const VkBuffer*>( buffers.begin() ), offsets.begin() );
|
||||||
|
}
|
||||||
|
|
||||||
void bindVertexBuffer( uint32_t firstBinding, Buffer const & buffer, DeviceSize const & offset ) const
|
void bindVertexBuffer( uint32_t firstBinding, Buffer const & buffer, DeviceSize const & offset ) const
|
||||||
{
|
{
|
||||||
vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, 1, reinterpret_cast<const VkBuffer*>( &buffer ), &offset );
|
vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, 1, reinterpret_cast<const VkBuffer*>( &buffer ), &offset );
|
||||||
@ -17925,6 +17949,11 @@ namespace vk
|
|||||||
vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferCopy*>( regions.data() ) );
|
vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferCopy*>( regions.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, std::initializer_list<BufferCopy> const & regions ) const
|
||||||
|
{
|
||||||
|
vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferCopy*>( regions.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, BufferCopy const & region ) const
|
void copyBuffer( Buffer srcBuffer, Buffer dstBuffer, BufferCopy const & region ) const
|
||||||
{
|
{
|
||||||
vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), 1, reinterpret_cast<const VkBufferCopy*>( ®ion ) );
|
vkCmdCopyBuffer( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkBuffer>( dstBuffer ), 1, reinterpret_cast<const VkBufferCopy*>( ®ion ) );
|
||||||
@ -17942,6 +17971,11 @@ namespace vk
|
|||||||
vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageCopy*>( regions.data() ) );
|
vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageCopy*>( regions.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list<ImageCopy> const & regions ) const
|
||||||
|
{
|
||||||
|
vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageCopy*>( regions.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageCopy const & region ) const
|
void copyImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageCopy const & region ) const
|
||||||
{
|
{
|
||||||
vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageCopy*>( ®ion ) );
|
vkCmdCopyImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageCopy*>( ®ion ) );
|
||||||
@ -17959,6 +17993,11 @@ namespace vk
|
|||||||
vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) );
|
vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageBlit*>( regions.data() ), static_cast<VkFilter>( filter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list<ImageBlit> const & regions, Filter filter ) const
|
||||||
|
{
|
||||||
|
vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageBlit*>( regions.begin() ), static_cast<VkFilter>( filter ) );
|
||||||
|
}
|
||||||
|
|
||||||
void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageBlit const & region, Filter filter ) const
|
void blitImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageBlit const & region, Filter filter ) const
|
||||||
{
|
{
|
||||||
vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageBlit*>( ®ion ), static_cast<VkFilter>( filter ) );
|
vkCmdBlitImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageBlit*>( ®ion ), static_cast<VkFilter>( filter ) );
|
||||||
@ -17976,6 +18015,11 @@ namespace vk
|
|||||||
vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
|
vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, std::initializer_list<BufferImageCopy> const & regions ) const
|
||||||
|
{
|
||||||
|
vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, BufferImageCopy const & region ) const
|
void copyBufferToImage( Buffer srcBuffer, Image dstImage, ImageLayout dstImageLayout, BufferImageCopy const & region ) const
|
||||||
{
|
{
|
||||||
vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkBufferImageCopy*>( ®ion ) );
|
vkCmdCopyBufferToImage( m_commandBuffer, static_cast<VkBuffer>( srcBuffer ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkBufferImageCopy*>( ®ion ) );
|
||||||
@ -17993,6 +18037,11 @@ namespace vk
|
|||||||
vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
|
vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, std::initializer_list<BufferImageCopy> const & regions ) const
|
||||||
|
{
|
||||||
|
vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkBufferImageCopy*>( regions.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, BufferImageCopy const & region ) const
|
void copyImageToBuffer( Image srcImage, ImageLayout srcImageLayout, Buffer dstBuffer, BufferImageCopy const & region ) const
|
||||||
{
|
{
|
||||||
vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), 1, reinterpret_cast<const VkBufferImageCopy*>( ®ion ) );
|
vkCmdCopyImageToBuffer( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkBuffer>( dstBuffer ), 1, reinterpret_cast<const VkBufferImageCopy*>( ®ion ) );
|
||||||
@ -18038,6 +18087,11 @@ namespace vk
|
|||||||
vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
|
vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, std::initializer_list<ImageSubresourceRange> const & ranges ) const
|
||||||
|
{
|
||||||
|
vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ImageSubresourceRange const & range ) const
|
void clearColorImage( Image image, ImageLayout imageLayout, const ClearColorValue & color, ImageSubresourceRange const & range ) const
|
||||||
{
|
{
|
||||||
vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), 1, reinterpret_cast<const VkImageSubresourceRange*>( &range ) );
|
vkCmdClearColorImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearColorValue*>( &color ), 1, reinterpret_cast<const VkImageSubresourceRange*>( &range ) );
|
||||||
@ -18055,6 +18109,11 @@ namespace vk
|
|||||||
vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
|
vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, std::initializer_list<ImageSubresourceRange> const & ranges ) const
|
||||||
|
{
|
||||||
|
vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), static_cast<uint32_t>( ranges.size() ), reinterpret_cast<const VkImageSubresourceRange*>( ranges.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ImageSubresourceRange const & range ) const
|
void clearDepthStencilImage( Image image, ImageLayout imageLayout, const ClearDepthStencilValue & depthStencil, ImageSubresourceRange const & range ) const
|
||||||
{
|
{
|
||||||
vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), 1, reinterpret_cast<const VkImageSubresourceRange*>( &range ) );
|
vkCmdClearDepthStencilImage( m_commandBuffer, static_cast<VkImage>( image ), static_cast<VkImageLayout>( imageLayout ), reinterpret_cast<const VkClearDepthStencilValue*>( &depthStencil ), 1, reinterpret_cast<const VkImageSubresourceRange*>( &range ) );
|
||||||
@ -18072,6 +18131,11 @@ namespace vk
|
|||||||
vkCmdClearAttachments( m_commandBuffer, static_cast<uint32_t>( attachments.size() ), reinterpret_cast<const VkClearAttachment*>( attachments.data() ), static_cast<uint32_t>( rects.size() ), reinterpret_cast<const VkClearRect*>( rects.data() ) );
|
vkCmdClearAttachments( m_commandBuffer, static_cast<uint32_t>( attachments.size() ), reinterpret_cast<const VkClearAttachment*>( attachments.data() ), static_cast<uint32_t>( rects.size() ), reinterpret_cast<const VkClearRect*>( rects.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearAttachments( std::initializer_list<ClearAttachment> const & attachments, std::initializer_list<ClearRect> const & rects ) const
|
||||||
|
{
|
||||||
|
vkCmdClearAttachments( m_commandBuffer, static_cast<uint32_t>( attachments.size() ), reinterpret_cast<const VkClearAttachment*>( attachments.begin() ), static_cast<uint32_t>( rects.size() ), reinterpret_cast<const VkClearRect*>( rects.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void clearAttachment( ClearAttachment const & attachment, ClearRect const & rect ) const
|
void clearAttachment( ClearAttachment const & attachment, ClearRect const & rect ) const
|
||||||
{
|
{
|
||||||
vkCmdClearAttachments( m_commandBuffer, 1, reinterpret_cast<const VkClearAttachment*>( &attachment ), 1, reinterpret_cast<const VkClearRect*>( &rect ) );
|
vkCmdClearAttachments( m_commandBuffer, 1, reinterpret_cast<const VkClearAttachment*>( &attachment ), 1, reinterpret_cast<const VkClearRect*>( &rect ) );
|
||||||
@ -18089,6 +18153,11 @@ namespace vk
|
|||||||
vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageResolve*>( regions.data() ) );
|
vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageResolve*>( regions.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, std::initializer_list<ImageResolve> const & regions ) const
|
||||||
|
{
|
||||||
|
vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), static_cast<uint32_t>( regions.size() ), reinterpret_cast<const VkImageResolve*>( regions.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageResolve const & region ) const
|
void resolveImage( Image srcImage, ImageLayout srcImageLayout, Image dstImage, ImageLayout dstImageLayout, ImageResolve const & region ) const
|
||||||
{
|
{
|
||||||
vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageResolve*>( ®ion ) );
|
vkCmdResolveImage( m_commandBuffer, static_cast<VkImage>( srcImage ), static_cast<VkImageLayout>( srcImageLayout ), static_cast<VkImage>( dstImage ), static_cast<VkImageLayout>( dstImageLayout ), 1, reinterpret_cast<const VkImageResolve*>( ®ion ) );
|
||||||
@ -18134,6 +18203,11 @@ namespace vk
|
|||||||
vkCmdWaitEvents( m_commandBuffer, static_cast<uint32_t>( events.size() ), reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
|
vkCmdWaitEvents( m_commandBuffer, static_cast<uint32_t>( events.size() ), reinterpret_cast<const VkEvent*>( events.data() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void waitEvents( std::initializer_list<Event> const & events, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, std::initializer_list<MemoryBarrier> const & memoryBarriers, std::initializer_list<BufferMemoryBarrier> const & bufferMemoryBarriers, std::initializer_list<ImageMemoryBarrier> const & imageMemoryBarriers ) const
|
||||||
|
{
|
||||||
|
vkCmdWaitEvents( m_commandBuffer, static_cast<uint32_t>( events.size() ), reinterpret_cast<const VkEvent*>( events.begin() ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.begin() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.begin() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void waitEvent( Event const & event, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const
|
void waitEvent( Event const & event, PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const
|
||||||
{
|
{
|
||||||
vkCmdWaitEvents( m_commandBuffer, 1, reinterpret_cast<const VkEvent*>( &event ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), 1, reinterpret_cast<const VkMemoryBarrier*>( &memoryBarrier ), 1, reinterpret_cast<const VkBufferMemoryBarrier*>( &bufferMemoryBarrier ), 1, reinterpret_cast<const VkImageMemoryBarrier*>( &imageMemoryBarrier ) );
|
vkCmdWaitEvents( m_commandBuffer, 1, reinterpret_cast<const VkEvent*>( &event ), static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), 1, reinterpret_cast<const VkMemoryBarrier*>( &memoryBarrier ), 1, reinterpret_cast<const VkBufferMemoryBarrier*>( &bufferMemoryBarrier ), 1, reinterpret_cast<const VkImageMemoryBarrier*>( &imageMemoryBarrier ) );
|
||||||
@ -18151,6 +18225,11 @@ namespace vk
|
|||||||
vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
|
vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.data() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.data() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, std::initializer_list<MemoryBarrier> const & memoryBarriers, std::initializer_list<BufferMemoryBarrier> const & bufferMemoryBarriers, std::initializer_list<ImageMemoryBarrier> const & imageMemoryBarriers ) const
|
||||||
|
{
|
||||||
|
vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), static_cast<uint32_t>( memoryBarriers.size() ), reinterpret_cast<const VkMemoryBarrier*>( memoryBarriers.begin() ), static_cast<uint32_t>( bufferMemoryBarriers.size() ), reinterpret_cast<const VkBufferMemoryBarrier*>( bufferMemoryBarriers.begin() ), static_cast<uint32_t>( imageMemoryBarriers.size() ), reinterpret_cast<const VkImageMemoryBarrier*>( imageMemoryBarriers.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const
|
void pipelineBarrier( PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, DependencyFlags dependencyFlags, MemoryBarrier const & memoryBarrier, BufferMemoryBarrier const & bufferMemoryBarrier, ImageMemoryBarrier const & imageMemoryBarrier ) const
|
||||||
{
|
{
|
||||||
vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), 1, reinterpret_cast<const VkMemoryBarrier*>( &memoryBarrier ), 1, reinterpret_cast<const VkBufferMemoryBarrier*>( &bufferMemoryBarrier ), 1, reinterpret_cast<const VkImageMemoryBarrier*>( &imageMemoryBarrier ) );
|
vkCmdPipelineBarrier( m_commandBuffer, static_cast<VkPipelineStageFlags>( srcStageMask ), static_cast<VkPipelineStageFlags>( dstStageMask ), static_cast<VkDependencyFlags>( dependencyFlags ), 1, reinterpret_cast<const VkMemoryBarrier*>( &memoryBarrier ), 1, reinterpret_cast<const VkBufferMemoryBarrier*>( &bufferMemoryBarrier ), 1, reinterpret_cast<const VkImageMemoryBarrier*>( &imageMemoryBarrier ) );
|
||||||
@ -18239,6 +18318,12 @@ namespace vk
|
|||||||
vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, static_cast<uint32_t>( values.size() * sizeof( T ) ), reinterpret_cast<const void*>( values.data() ) );
|
vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, static_cast<uint32_t>( values.size() * sizeof( T ) ), reinterpret_cast<const void*>( values.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void pushConstants( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, std::initializer_list<T> const & values ) const
|
||||||
|
{
|
||||||
|
vkCmdPushConstants( m_commandBuffer, static_cast<VkPipelineLayout>( layout ), static_cast<VkShaderStageFlags>( stageFlags ), offset, static_cast<uint32_t>( values.size() * sizeof( T ) ), reinterpret_cast<const void*>( values.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void pushConstant( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, T const & value ) const
|
void pushConstant( PipelineLayout layout, ShaderStageFlags stageFlags, uint32_t offset, T const & value ) const
|
||||||
{
|
{
|
||||||
@ -18297,6 +18382,11 @@ namespace vk
|
|||||||
vkCmdExecuteCommands( m_commandBuffer, static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
|
vkCmdExecuteCommands( m_commandBuffer, static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void executeCommands( std::initializer_list<CommandBuffer> const & commandBuffers ) const
|
||||||
|
{
|
||||||
|
vkCmdExecuteCommands( m_commandBuffer, static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void executeCommand( CommandBuffer const & commandBuffer ) const
|
void executeCommand( CommandBuffer const & commandBuffer ) const
|
||||||
{
|
{
|
||||||
vkCmdExecuteCommands( m_commandBuffer, 1, reinterpret_cast<const VkCommandBuffer*>( &commandBuffer ) );
|
vkCmdExecuteCommands( m_commandBuffer, 1, reinterpret_cast<const VkCommandBuffer*>( &commandBuffer ) );
|
||||||
@ -18881,6 +18971,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void submit( std::initializer_list<SubmitInfo> const & submits, Fence fence ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkQueueSubmit( m_queue, static_cast<uint32_t>( submits.size() ), reinterpret_cast<const VkSubmitInfo*>( submits.begin() ), static_cast<VkFence>( fence ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Queue::submit" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void submit( SubmitInfo const & submit, Fence fence ) const
|
void submit( SubmitInfo const & submit, Fence fence ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkQueueSubmit( m_queue, 1, reinterpret_cast<const VkSubmitInfo*>( &submit ), static_cast<VkFence>( fence ) ) );
|
Result result = static_cast<Result>( vkQueueSubmit( m_queue, 1, reinterpret_cast<const VkSubmitInfo*>( &submit ), static_cast<VkFence>( fence ) ) );
|
||||||
@ -18924,6 +19023,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bindSparse( std::initializer_list<BindSparseInfo> const & bindInfo, Fence fence ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkQueueBindSparse( m_queue, static_cast<uint32_t>( bindInfo.size() ), reinterpret_cast<const VkBindSparseInfo*>( bindInfo.begin() ), static_cast<VkFence>( fence ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Queue::bindSparse" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void bindSparse( BindSparseInfo const & bindInfo, Fence fence ) const
|
void bindSparse( BindSparseInfo const & bindInfo, Fence fence ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkQueueBindSparse( m_queue, 1, reinterpret_cast<const VkBindSparseInfo*>( &bindInfo ), static_cast<VkFence>( fence ) ) );
|
Result result = static_cast<Result>( vkQueueBindSparse( m_queue, 1, reinterpret_cast<const VkBindSparseInfo*>( &bindInfo ), static_cast<VkFence>( fence ) ) );
|
||||||
@ -20335,6 +20443,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void flushMappedMemoryRanges( std::initializer_list<MappedMemoryRange> const & memoryRanges ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkFlushMappedMemoryRanges( m_device, static_cast<uint32_t>( memoryRanges.size() ), reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.begin() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::flushMappedMemoryRanges" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void flushMappedMemoryRange( MappedMemoryRange const & memoryRange ) const
|
void flushMappedMemoryRange( MappedMemoryRange const & memoryRange ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkFlushMappedMemoryRanges( m_device, 1, reinterpret_cast<const VkMappedMemoryRange*>( &memoryRange ) ) );
|
Result result = static_cast<Result>( vkFlushMappedMemoryRanges( m_device, 1, reinterpret_cast<const VkMappedMemoryRange*>( &memoryRange ) ) );
|
||||||
@ -20360,6 +20477,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void invalidateMappedMemoryRanges( std::initializer_list<MappedMemoryRange> const & memoryRanges ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, static_cast<uint32_t>( memoryRanges.size() ), reinterpret_cast<const VkMappedMemoryRange*>( memoryRanges.begin() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::invalidateMappedMemoryRanges" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void invalidateMappedMemoryRange( MappedMemoryRange const & memoryRange ) const
|
void invalidateMappedMemoryRange( MappedMemoryRange const & memoryRange ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, 1, reinterpret_cast<const VkMappedMemoryRange*>( &memoryRange ) ) );
|
Result result = static_cast<Result>( vkInvalidateMappedMemoryRanges( m_device, 1, reinterpret_cast<const VkMappedMemoryRange*>( &memoryRange ) ) );
|
||||||
@ -20510,6 +20636,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetFences( std::initializer_list<Fence> const & fences ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkResetFences( m_device, static_cast<uint32_t>( fences.size() ), reinterpret_cast<const VkFence*>( fences.begin() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::resetFences" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void resetFence( Fence const & fence ) const
|
void resetFence( Fence const & fence ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkResetFences( m_device, 1, reinterpret_cast<const VkFence*>( &fence ) ) );
|
Result result = static_cast<Result>( vkResetFences( m_device, 1, reinterpret_cast<const VkFence*>( &fence ) ) );
|
||||||
@ -20555,6 +20690,16 @@ namespace vk
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result waitForFences( std::initializer_list<Fence> const & fences, Bool32 waitAll, uint64_t timeout ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkWaitForFences( m_device, static_cast<uint32_t>( fences.size() ), reinterpret_cast<const VkFence*>( fences.begin() ), waitAll, timeout ) );
|
||||||
|
if ( ( result != Result::eSuccess ) && ( result != Result::eTimeout ) )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::waitForFences" );
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Result waitForFence( Fence const & fence, Bool32 waitAll, uint64_t timeout ) const
|
Result waitForFence( Fence const & fence, Bool32 waitAll, uint64_t timeout ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkWaitForFences( m_device, 1, reinterpret_cast<const VkFence*>( &fence ), waitAll, timeout ) );
|
Result result = static_cast<Result>( vkWaitForFences( m_device, 1, reinterpret_cast<const VkFence*>( &fence ), waitAll, timeout ) );
|
||||||
@ -20962,6 +21107,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mergePipelineCaches( PipelineCache dstCache, std::initializer_list<PipelineCache> const & srcCaches ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), static_cast<uint32_t>( srcCaches.size() ), reinterpret_cast<const VkPipelineCache*>( srcCaches.begin() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::mergePipelineCaches" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void mergePipelineCache( PipelineCache dstCache, PipelineCache const & srcCache ) const
|
void mergePipelineCache( PipelineCache dstCache, PipelineCache const & srcCache ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), 1, reinterpret_cast<const VkPipelineCache*>( &srcCache ) ) );
|
Result result = static_cast<Result>( vkMergePipelineCaches( m_device, static_cast<VkPipelineCache>( dstCache ), 1, reinterpret_cast<const VkPipelineCache*>( &srcCache ) ) );
|
||||||
@ -20989,6 +21143,17 @@ namespace vk
|
|||||||
return pipelines;
|
return pipelines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<Pipeline> createGraphicsPipelines( PipelineCache pipelineCache, std::initializer_list<GraphicsPipelineCreateInfo> const & createInfos, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
|
{
|
||||||
|
std::vector<Pipeline> pipelines( createInfos.size() );
|
||||||
|
Result result = static_cast<Result>( vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), static_cast<uint32_t>( createInfos.size() ), reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.begin() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::createGraphicsPipelines" );
|
||||||
|
}
|
||||||
|
return pipelines;
|
||||||
|
}
|
||||||
|
|
||||||
Pipeline createGraphicsPipeline( PipelineCache pipelineCache, GraphicsPipelineCreateInfo const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
Pipeline createGraphicsPipeline( PipelineCache pipelineCache, GraphicsPipelineCreateInfo const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
{
|
{
|
||||||
Pipeline pipeline;
|
Pipeline pipeline;
|
||||||
@ -21018,6 +21183,17 @@ namespace vk
|
|||||||
return pipelines;
|
return pipelines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<Pipeline> createComputePipelines( PipelineCache pipelineCache, std::initializer_list<ComputePipelineCreateInfo> const & createInfos, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
|
{
|
||||||
|
std::vector<Pipeline> pipelines( createInfos.size() );
|
||||||
|
Result result = static_cast<Result>( vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), static_cast<uint32_t>( createInfos.size() ), reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.begin() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkPipeline*>( pipelines.data() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::createComputePipelines" );
|
||||||
|
}
|
||||||
|
return pipelines;
|
||||||
|
}
|
||||||
|
|
||||||
Pipeline createComputePipeline( PipelineCache pipelineCache, ComputePipelineCreateInfo const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
Pipeline createComputePipeline( PipelineCache pipelineCache, ComputePipelineCreateInfo const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
{
|
{
|
||||||
Pipeline pipeline;
|
Pipeline pipeline;
|
||||||
@ -21213,6 +21389,15 @@ namespace vk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void freeDescriptorSets( DescriptorPool descriptorPool, std::initializer_list<DescriptorSet> const & descriptorSets ) const
|
||||||
|
{
|
||||||
|
Result result = static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), static_cast<uint32_t>( descriptorSets.size() ), reinterpret_cast<const VkDescriptorSet*>( descriptorSets.begin() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::freeDescriptorSets" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void freeDescriptorSet( DescriptorPool descriptorPool, DescriptorSet const & descriptorSet ) const
|
void freeDescriptorSet( DescriptorPool descriptorPool, DescriptorSet const & descriptorSet ) const
|
||||||
{
|
{
|
||||||
Result result = static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), 1, reinterpret_cast<const VkDescriptorSet*>( &descriptorSet ) ) );
|
Result result = static_cast<Result>( vkFreeDescriptorSets( m_device, static_cast<VkDescriptorPool>( descriptorPool ), 1, reinterpret_cast<const VkDescriptorSet*>( &descriptorSet ) ) );
|
||||||
@ -21234,6 +21419,11 @@ namespace vk
|
|||||||
vkUpdateDescriptorSets( m_device, static_cast<uint32_t>( descriptorWrites.size() ), reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), static_cast<uint32_t>( descriptorCopies.size() ), reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) );
|
vkUpdateDescriptorSets( m_device, static_cast<uint32_t>( descriptorWrites.size() ), reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.data() ), static_cast<uint32_t>( descriptorCopies.size() ), reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateDescriptorSets( std::initializer_list<WriteDescriptorSet> const & descriptorWrites, std::initializer_list<CopyDescriptorSet> const & descriptorCopies ) const
|
||||||
|
{
|
||||||
|
vkUpdateDescriptorSets( m_device, static_cast<uint32_t>( descriptorWrites.size() ), reinterpret_cast<const VkWriteDescriptorSet*>( descriptorWrites.begin() ), static_cast<uint32_t>( descriptorCopies.size() ), reinterpret_cast<const VkCopyDescriptorSet*>( descriptorCopies.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void updateDescriptorSet( WriteDescriptorSet const & descriptorWrite, CopyDescriptorSet const & descriptorCopie ) const
|
void updateDescriptorSet( WriteDescriptorSet const & descriptorWrite, CopyDescriptorSet const & descriptorCopie ) const
|
||||||
{
|
{
|
||||||
vkUpdateDescriptorSets( m_device, 1, reinterpret_cast<const VkWriteDescriptorSet*>( &descriptorWrite ), 1, reinterpret_cast<const VkCopyDescriptorSet*>( &descriptorCopie ) );
|
vkUpdateDescriptorSets( m_device, 1, reinterpret_cast<const VkWriteDescriptorSet*>( &descriptorWrite ), 1, reinterpret_cast<const VkCopyDescriptorSet*>( &descriptorCopie ) );
|
||||||
@ -21391,6 +21581,11 @@ namespace vk
|
|||||||
vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
|
vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.data() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void freeCommandBuffers( CommandPool commandPool, std::initializer_list<CommandBuffer> const & commandBuffers ) const
|
||||||
|
{
|
||||||
|
vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), static_cast<uint32_t>( commandBuffers.size() ), reinterpret_cast<const VkCommandBuffer*>( commandBuffers.begin() ) );
|
||||||
|
}
|
||||||
|
|
||||||
void freeCommandBuffer( CommandPool commandPool, CommandBuffer const & commandBuffer ) const
|
void freeCommandBuffer( CommandPool commandPool, CommandBuffer const & commandBuffer ) const
|
||||||
{
|
{
|
||||||
vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), 1, reinterpret_cast<const VkCommandBuffer*>( &commandBuffer ) );
|
vkFreeCommandBuffers( m_device, static_cast<VkCommandPool>( commandPool ), 1, reinterpret_cast<const VkCommandBuffer*>( &commandBuffer ) );
|
||||||
@ -21414,6 +21609,17 @@ namespace vk
|
|||||||
return swapchains;
|
return swapchains;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<SwapchainKHR> createSharedSwapchainsKHR( std::initializer_list<SwapchainCreateInfoKHR> const & createInfos, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
|
{
|
||||||
|
std::vector<SwapchainKHR> swapchains( createInfos.size() );
|
||||||
|
Result result = static_cast<Result>( vkCreateSharedSwapchainsKHR( m_device, static_cast<uint32_t>( createInfos.size() ), reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.begin() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator)), reinterpret_cast<VkSwapchainKHR*>( swapchains.data() ) ) );
|
||||||
|
if ( result != Result::eSuccess )
|
||||||
|
{
|
||||||
|
throw std::system_error( result, "vk::Device::createSharedSwapchainsKHR" );
|
||||||
|
}
|
||||||
|
return swapchains;
|
||||||
|
}
|
||||||
|
|
||||||
SwapchainKHR createSharedSwapchainsKHR( SwapchainCreateInfoKHR const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
SwapchainKHR createSharedSwapchainsKHR( SwapchainCreateInfoKHR const & createInfo, Optional<const AllocationCallbacks> const & allocator = nullptr ) const
|
||||||
{
|
{
|
||||||
SwapchainKHR swapchain;
|
SwapchainKHR swapchain;
|
||||||
|
Loading…
Reference in New Issue
Block a user