Update to Vulkan 1.1.85

This commit is contained in:
Markus Tavenrath 2018-09-21 11:07:50 +02:00
parent 295d5c755f
commit f6ab729921
3 changed files with 3812 additions and 49 deletions

@ -1 +1 @@
Subproject commit dd9919749a56177c2eb9b6525c0979722a3c24ff Subproject commit 9858c1e89e21246f779226d2be779fd33bb6a50d

View File

@ -375,30 +375,30 @@ const std::string structureChainHeader = R"(
template <typename X, typename Y> struct isStructureChainValid { enum { value = false }; }; template <typename X, typename Y> struct isStructureChainValid { enum { value = false }; };
template <typename P, typename T> template <typename P, typename T>
struct TypeList struct TypeList
{ {
using list = P; using list = P;
using last = T; using last = T;
}; };
template <typename List, typename X> template <typename List, typename X>
struct extendCheck struct extendCheck
{ {
static const bool valid = isStructureChainValid<typename List::last, X>::value || extendCheck<typename List::list,X>::valid; static const bool valid = isStructureChainValid<typename List::last, X>::value || extendCheck<typename List::list,X>::valid;
}; };
template <typename T, typename X> template <typename T, typename X>
struct extendCheck<TypeList<void,T>,X> struct extendCheck<TypeList<void,T>,X>
{ {
static const bool valid = isStructureChainValid<T, X>::value; static const bool valid = isStructureChainValid<T, X>::value;
}; };
template <typename X> template <typename X>
struct extendCheck<void,X> struct extendCheck<void,X>
{ {
static const bool valid = true; static const bool valid = true;
}; };
template <class Element> template <class Element>
class StructureChainElement class StructureChainElement
@ -1451,6 +1451,7 @@ std::map<std::string, std::string> VulkanHppGenerator::createDefaults()
void VulkanHppGenerator::determineEnhancedReturnType(CommandData & commandData) void VulkanHppGenerator::determineEnhancedReturnType(CommandData & commandData)
{ {
std::string returnType; std::string returnType;
// if there is a return parameter of type void or Result, and if it's of type Result it either has just one success code // if there is a return parameter of type void or Result, and if it's of type Result it either has just one success code
// or two success codes, where the second one is of type eIncomplete and it's a two-step process // or two success codes, where the second one is of type eIncomplete and it's a two-step process
// -> we can return that parameter // -> we can return that parameter
@ -1551,7 +1552,17 @@ void VulkanHppGenerator::determineReturnParam(CommandData & commandData)
void VulkanHppGenerator::determineSkippedParams(CommandData & commandData) void VulkanHppGenerator::determineSkippedParams(CommandData & commandData)
{ {
// the size-parameters of vector parameters are not explicitly used in the enhanced API // the size-parameters of vector parameters are not explicitly used in the enhanced API
std::for_each(commandData.vectorParams.begin(), commandData.vectorParams.end(), [&commandData](std::pair<size_t, size_t> const& vp) { if (vp.second != ~0) commandData.skippedParams.insert(vp.second); }); std::for_each(commandData.vectorParams.begin(), commandData.vectorParams.end(), [&commandData](std::pair<size_t, size_t> const& vp)
{
// skip output-vector params which are indicated through a pointer.
if (vp.second != ~0 // it is an vector
// and it's not a get function with a fixed size input
&& !(commandData.fullName.find("get") == 0 && commandData.params[vp.second].unchangedType.find("*") == std::string::npos && vp.first == commandData.returnParam))
{
commandData.skippedParams.insert(vp.second);
}
});
// and the return parameter is also skipped // and the return parameter is also skipped
if (commandData.returnParam != ~0) if (commandData.returnParam != ~0)
{ {
@ -3090,7 +3101,9 @@ void VulkanHppGenerator::writeCallCountParameter(std::ostream & os, CommandData
if (commandData.templateParam == it->second) if (commandData.templateParam == it->second)
{ {
// if the vector parameter is templatized -> multiply by the size of that type to get the size in bytes // if the vector parameter is templatized -> multiply by the size of that type to get the size in bytes
os << "* sizeof( T ) "; if (commandData.enhancedReturnType != "std::vector<uint8_t,Allocator>") {
os << "* sizeof( T ) ";
}
} }
} }
} }

File diff suppressed because it is too large Load Diff