mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-08 13:40:08 +00:00
Refactor commands that enumerate some oqaque data behind a void pointer.
This commit is contained in:
parent
55a27c7dfa
commit
1da76e4b4a
@ -57,7 +57,7 @@ std::string createEnumValueName( std::string const & name,
|
|||||||
std::string createSuccessCode( std::string const & code, std::set<std::string> const & tags );
|
std::string createSuccessCode( std::string const & code, std::set<std::string> const & tags );
|
||||||
std::string determineCommandName( std::string const & vulkanCommandName, std::string const & firstArgumentType );
|
std::string determineCommandName( std::string const & vulkanCommandName, std::string const & firstArgumentType );
|
||||||
std::set<size_t> determineSkippedParams( size_t returnParamIndex, std::map<size_t, size_t> const & vectorParamIndices );
|
std::set<size_t> determineSkippedParams( size_t returnParamIndex, std::map<size_t, size_t> const & vectorParamIndices );
|
||||||
std::string extractTag( int line, std::string const & name, std::set<std::string> const & tags );
|
std::string extractTag( int line, std::string const & name, std::set<std::string> const & tags );
|
||||||
std::string findTag( std::set<std::string> const & tags, std::string const & name, std::string const & postfix = "" );
|
std::string findTag( std::set<std::string> const & tags, std::string const & name, std::string const & postfix = "" );
|
||||||
std::pair<bool, std::string> generateFunctionBodyStandardReturn( std::string const & returnType );
|
std::pair<bool, std::string> generateFunctionBodyStandardReturn( std::string const & returnType );
|
||||||
std::map<std::string, std::string> getAttributes( tinyxml2::XMLElement const * element );
|
std::map<std::string, std::string> getAttributes( tinyxml2::XMLElement const * element );
|
||||||
@ -1247,8 +1247,7 @@ void VulkanHppGenerator::appendCommand( std::string & str,
|
|||||||
// two returns but just one vector
|
// two returns but just one vector
|
||||||
auto vectorParamIndexIt = vectorParamIndices.begin();
|
auto vectorParamIndexIt = vectorParamIndices.begin();
|
||||||
if ( ( vectorParamIndexIt->second == nonConstPointerParamIndices[0] ) &&
|
if ( ( vectorParamIndexIt->second == nonConstPointerParamIndices[0] ) &&
|
||||||
( vectorParamIndexIt->first == nonConstPointerParamIndices[1] ) &&
|
( vectorParamIndexIt->first == nonConstPointerParamIndices[1] ) )
|
||||||
( commandData.params[vectorParamIndexIt->first].type.type != "void" ) )
|
|
||||||
{
|
{
|
||||||
// the size is a return value as well -> enumerate the values
|
// the size is a return value as well -> enumerate the values
|
||||||
// and the vector data is not of type void
|
// and the vector data is not of type void
|
||||||
@ -2863,8 +2862,8 @@ void VulkanHppGenerator::appendFunctionHeaderArgumentEnhancedVector( std::string
|
|||||||
// use our ArrayProxy
|
// use our ArrayProxy
|
||||||
bool isConst = ( param.type.prefix.find( "const" ) != std::string::npos );
|
bool isConst = ( param.type.prefix.find( "const" ) != std::string::npos );
|
||||||
str += optionalBegin + "ArrayProxy<" +
|
str += optionalBegin + "ArrayProxy<" +
|
||||||
( isTemplateParam ? ( isConst ? "const T" : "T" ) : stripPostfix( param.type.compose(), "*" ) ) +
|
( isTemplateParam ? ( isConst ? "const T" : "T" ) : stripPostfix( param.type.compose(), "*" ) ) + "> const &" +
|
||||||
"> const &" + optionalEnd + strippedParameterName;
|
optionalEnd + strippedParameterName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VulkanHppGenerator::appendFunctionHeaderArguments( std::string & str,
|
void VulkanHppGenerator::appendFunctionHeaderArguments( std::string & str,
|
||||||
@ -3565,9 +3564,8 @@ std::string VulkanHppGenerator::constructArgumentListEnhanced( std::vector<Param
|
|||||||
else if ( params[i].optional )
|
else if ( params[i].optional )
|
||||||
{
|
{
|
||||||
argumentList +=
|
argumentList +=
|
||||||
"Optional<const " + stripPrefix( params[i].type.type, "Vk" ) + "> " +
|
"Optional<const " + stripPrefix( params[i].type.type, "Vk" ) + "> " + name +
|
||||||
name +
|
( ( definition || withAllocators ) ? "" : " VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT" );
|
||||||
( ( definition || withAllocators ) ? "" : " VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT" );
|
|
||||||
hasDefaultAssignment = true;
|
hasDefaultAssignment = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3636,7 +3634,8 @@ std::string VulkanHppGenerator::constructArgumentListEnhanced( std::vector<Param
|
|||||||
{
|
{
|
||||||
if ( !params[sp].len.empty() )
|
if ( !params[sp].len.empty() )
|
||||||
{
|
{
|
||||||
std::string type = startUpperCase( stripPrefix( params[sp].type.type, "Vk" ) );
|
std::string type =
|
||||||
|
( params[sp].type.type == "void" ) ? "Uint8_t" : startUpperCase( stripPrefix( params[sp].type.type, "Vk" ) );
|
||||||
argumentList += type + "Allocator & " + startLowerCase( type ) + "Allocator, ";
|
argumentList += type + "Allocator & " + startLowerCase( type ) + "Allocator, ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4045,14 +4044,20 @@ std::string VulkanHppGenerator::constructCommandResultEnumerate( std::string con
|
|||||||
std::string commandName = determineCommandName( name, commandData.params[0].type.type );
|
std::string commandName = determineCommandName( name, commandData.params[0].type.type );
|
||||||
std::string nodiscard = constructNoDiscardEnhanced( commandData );
|
std::string nodiscard = constructNoDiscardEnhanced( commandData );
|
||||||
std::string vectorElementType = stripPrefix( commandData.params[vectorParamIndices.first].type.type, "Vk" );
|
std::string vectorElementType = stripPrefix( commandData.params[vectorParamIndices.first].type.type, "Vk" );
|
||||||
|
if ( commandData.params[vectorParamIndices.first].type.type == "void" )
|
||||||
|
{
|
||||||
|
// for returning vectors of type void, we use uint8_t !
|
||||||
|
vectorElementType = "uint8_t";
|
||||||
|
}
|
||||||
|
std::string allocatorType = startUpperCase( vectorElementType ) + "Allocator";
|
||||||
|
|
||||||
if ( definition )
|
if ( definition )
|
||||||
{
|
{
|
||||||
const std::string functionTemplate =
|
const std::string functionTemplate =
|
||||||
R"( template <typename ${vectorElementType}Allocator, typename Dispatch${withAllocatorTypenameCheck}>
|
R"( template <typename ${allocatorType}, typename Dispatch${withAllocatorTypenameCheck}>
|
||||||
${nodiscard}VULKAN_HPP_INLINE typename ResultValueType<std::vector<${vectorElementType}, ${vectorElementType}Allocator>>::type ${className}${commandName}( ${argumentList} )${const}
|
${nodiscard}VULKAN_HPP_INLINE typename ResultValueType<std::vector<${vectorElementType}, ${allocatorType}>>::type ${className}${commandName}( ${argumentList} )${const}
|
||||||
{
|
{
|
||||||
std::vector<${vectorElementType}, ${vectorElementType}Allocator> ${vectorName}${vectorAllocator};
|
std::vector<${vectorElementType}, ${allocatorType}> ${vectorName}${vectorAllocator};
|
||||||
${counterType} ${counterName};
|
${counterType} ${counterName};
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
@ -4079,7 +4084,8 @@ std::string VulkanHppGenerator::constructCommandResultEnumerate( std::string con
|
|||||||
str = replaceWithMap(
|
str = replaceWithMap(
|
||||||
functionTemplate,
|
functionTemplate,
|
||||||
std::map<std::string, std::string>(
|
std::map<std::string, std::string>(
|
||||||
{ { "argumentList", argumentList },
|
{ { "allocatorType", allocatorType },
|
||||||
|
{ "argumentList", argumentList },
|
||||||
{ "className", commandData.handle.empty() ? "" : ( stripPrefix( commandData.handle, "Vk" ) + "::" ) },
|
{ "className", commandData.handle.empty() ? "" : ( stripPrefix( commandData.handle, "Vk" ) + "::" ) },
|
||||||
{ "commandName", commandName },
|
{ "commandName", commandName },
|
||||||
{ "const", commandData.handle.empty() ? "" : " const" },
|
{ "const", commandData.handle.empty() ? "" : " const" },
|
||||||
@ -4092,7 +4098,7 @@ std::string VulkanHppGenerator::constructCommandResultEnumerate( std::string con
|
|||||||
{ "secondCallArguments",
|
{ "secondCallArguments",
|
||||||
constructCallArgumentsEnumerateVectors(
|
constructCallArgumentsEnumerateVectors(
|
||||||
commandData.handle, commandData.params, { vectorParamIndices }, false ) },
|
commandData.handle, commandData.params, { vectorParamIndices }, false ) },
|
||||||
{ "vectorAllocator", withAllocator ? ( "( " + startLowerCase( vectorElementType ) + "Allocator )" ) : "" },
|
{ "vectorAllocator", withAllocator ? ( "( " + startLowerCase( allocatorType ) + " )" ) : "" },
|
||||||
{ "vectorElementType", vectorElementType },
|
{ "vectorElementType", vectorElementType },
|
||||||
{ "vectorName", startLowerCase( stripPrefix( commandData.params[vectorParamIndices.first].name, "p" ) ) },
|
{ "vectorName", startLowerCase( stripPrefix( commandData.params[vectorParamIndices.first].name, "p" ) ) },
|
||||||
{ "vkCommand", name },
|
{ "vkCommand", name },
|
||||||
@ -4101,17 +4107,17 @@ std::string VulkanHppGenerator::constructCommandResultEnumerate( std::string con
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const std::string functionTemplate =
|
const std::string functionTemplate =
|
||||||
R"( template <typename ${vectorElementType}Allocator = std::allocator<${vectorElementType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${withAllocatorTypenameCheck}>
|
R"( template <typename ${allocatorType} = std::allocator<${vectorElementType}>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE${withAllocatorTypenameCheck}>
|
||||||
${nodiscard}typename ResultValueType<std::vector<${vectorElementType}, ${vectorElementType}Allocator>>::type ${commandName}( ${argumentList} )${const};)";
|
${nodiscard}typename ResultValueType<std::vector<${vectorElementType}, ${allocatorType}>>::type ${commandName}( ${argumentList} )${const};)";
|
||||||
|
|
||||||
std::string withAllocatorsTypenameCheck =
|
std::string withAllocatorsTypenameCheck = ", typename B = " + allocatorType +
|
||||||
", typename B = " + vectorElementType +
|
", typename std::enable_if<std::is_same<typename B::value_type, " +
|
||||||
"Allocator, typename std::enable_if<std::is_same<typename B::value_type, " + vectorElementType +
|
vectorElementType + ">::value, int>::type = 0";
|
||||||
">::value, int>::type = 0";
|
|
||||||
|
|
||||||
str = replaceWithMap( functionTemplate,
|
str = replaceWithMap( functionTemplate,
|
||||||
std::map<std::string, std::string>(
|
std::map<std::string, std::string>(
|
||||||
{ { "argumentList", argumentList },
|
{ { "allocatorType", allocatorType },
|
||||||
|
{ "argumentList", argumentList },
|
||||||
{ "const", commandData.handle.empty() ? "" : " const" },
|
{ "const", commandData.handle.empty() ? "" : " const" },
|
||||||
{ "commandName", commandName },
|
{ "commandName", commandName },
|
||||||
{ "nodiscard", nodiscard },
|
{ "nodiscard", nodiscard },
|
||||||
@ -7215,9 +7221,9 @@ size_t VulkanHppGenerator::determineDefaultStartIndex( std::vector<ParamData> co
|
|||||||
return defaultStartIndex;
|
return defaultStartIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string VulkanHppGenerator::determineEnhancedReturnType( CommandData const & commandData,
|
std::string VulkanHppGenerator::determineEnhancedReturnType( CommandData const & commandData,
|
||||||
size_t returnParamIndex,
|
size_t returnParamIndex,
|
||||||
bool isStructureChain ) const
|
bool isStructureChain ) const
|
||||||
{
|
{
|
||||||
assert( ( returnParamIndex == INVALID_INDEX ) || ( returnParamIndex < commandData.params.size() ) );
|
assert( ( returnParamIndex == INVALID_INDEX ) || ( returnParamIndex < commandData.params.size() ) );
|
||||||
|
|
||||||
@ -7229,12 +7235,12 @@ std::string VulkanHppGenerator::determineEnhancedReturnType( CommandData const &
|
|||||||
assert( ( commandData.returnType == "void" ) || ( commandData.returnType == "VkResult" ) );
|
assert( ( commandData.returnType == "void" ) || ( commandData.returnType == "VkResult" ) );
|
||||||
assert( commandData.successCodes.empty() || ( commandData.successCodes[0] == "VK_SUCCESS" ) );
|
assert( commandData.successCodes.empty() || ( commandData.successCodes[0] == "VK_SUCCESS" ) );
|
||||||
enhancedReturnType = ( commandData.params[returnParamIndex].type.type == "void" )
|
enhancedReturnType = ( commandData.params[returnParamIndex].type.type == "void" )
|
||||||
? "std::vector<uint8_t,Allocator>" // the return parameter is a vector-type parameter
|
? "std::vector<uint8_t,Allocator>" // the return parameter is a vector-type parameter
|
||||||
: isStructureChain
|
: isStructureChain
|
||||||
? "std::vector<StructureChain,Allocator>" // for structureChain returns, it's just
|
? "std::vector<StructureChain,Allocator>" // for structureChain returns, it's just
|
||||||
// a vector of StrutureChains
|
// a vector of StrutureChains
|
||||||
: "std::vector<" + stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" ) +
|
: "std::vector<" + stripPrefix( commandData.params[returnParamIndex].type.type, "Vk" ) +
|
||||||
",Allocator>"; // for the other parameters, we use a vector of the pure type
|
",Allocator>"; // for the other parameters, we use a vector of the pure type
|
||||||
}
|
}
|
||||||
else if ( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) )
|
else if ( ( commandData.returnType == "VkResult" ) && ( commandData.successCodes.size() == 1 ) )
|
||||||
{
|
{
|
||||||
|
@ -55095,20 +55095,21 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
VULKAN_HPP_NODISCARD Result
|
VULKAN_HPP_NODISCARD Result
|
||||||
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
size_t * pDataSize,
|
size_t * pDataSize,
|
||||||
void * pData,
|
void * pData VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<uint8_t>,
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = Uint8_tAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
@ -55440,24 +55441,25 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
||||||
size_t * pInfoSize,
|
size_t * pInfoSize,
|
||||||
void * pInfo,
|
void * pInfo VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<uint8_t>,
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = Uint8_tAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
@ -55511,20 +55513,21 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
VULKAN_HPP_NODISCARD Result getValidationCacheDataEXT(
|
VULKAN_HPP_NODISCARD Result getValidationCacheDataEXT(
|
||||||
VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
||||||
size_t * pDataSize,
|
size_t * pDataSize,
|
||||||
void * pData,
|
void * pData VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const VULKAN_HPP_NOEXCEPT;
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator = std::allocator<uint8_t>, typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Allocator = std::allocator<uint8_t>,
|
template <typename Uint8_tAllocator = std::allocator<uint8_t>,
|
||||||
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||||
typename B = Allocator,
|
typename B = Uint8_tAllocator,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type = 0>
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
|
||||||
@ -99806,14 +99809,15 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>(
|
return static_cast<Result>(
|
||||||
d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) );
|
d.vkGetPipelineCacheData( m_device, static_cast<VkPipelineCache>( pipelineCache ), pDataSize, pData ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename Uint8_tAllocator, typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d ) const
|
Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache, Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> data;
|
std::vector<uint8_t, Uint8_tAllocator> data;
|
||||||
size_t dataSize;
|
size_t dataSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>(
|
result = static_cast<Result>(
|
||||||
@ -99825,27 +99829,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
&dataSize,
|
&dataSize,
|
||||||
reinterpret_cast<void *>( data.data() ) ) );
|
reinterpret_cast<void *>( data.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
|
||||||
data.resize( dataSize );
|
data.resize( dataSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" );
|
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename Uint8_tAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
Device::getPipelineCacheData( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> data( vectorAllocator );
|
std::vector<uint8_t, Uint8_tAllocator> data( uint8_tAllocator );
|
||||||
size_t dataSize;
|
size_t dataSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>(
|
result = static_cast<Result>(
|
||||||
@ -99857,11 +99862,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
&dataSize,
|
&dataSize,
|
||||||
reinterpret_cast<void *>( data.data() ) ) );
|
reinterpret_cast<void *>( data.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
|
||||||
data.resize( dataSize );
|
data.resize( dataSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" );
|
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getPipelineCacheData" );
|
||||||
@ -100652,17 +100657,18 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
pInfoSize,
|
pInfoSize,
|
||||||
pInfo ) );
|
pInfo ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename Uint8_tAllocator, typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> info;
|
std::vector<uint8_t, Uint8_tAllocator> info;
|
||||||
size_t infoSize;
|
size_t infoSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device,
|
result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device,
|
||||||
@ -100680,29 +100686,30 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkShaderInfoTypeAMD>( infoType ),
|
static_cast<VkShaderInfoTypeAMD>( infoType ),
|
||||||
&infoSize,
|
&infoSize,
|
||||||
reinterpret_cast<void *>( info.data() ) ) );
|
reinterpret_cast<void *>( info.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( infoSize <= info.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( infoSize < info.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( infoSize <= info.size() );
|
|
||||||
info.resize( infoSize );
|
info.resize( infoSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" );
|
return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename Uint8_tAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
Device::getShaderInfoAMD( VULKAN_HPP_NAMESPACE::Pipeline pipeline,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
VULKAN_HPP_NAMESPACE::ShaderStageFlagBits shaderStage,
|
||||||
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
VULKAN_HPP_NAMESPACE::ShaderInfoTypeAMD infoType,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> info( vectorAllocator );
|
std::vector<uint8_t, Uint8_tAllocator> info( uint8_tAllocator );
|
||||||
size_t infoSize;
|
size_t infoSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device,
|
result = static_cast<Result>( d.vkGetShaderInfoAMD( m_device,
|
||||||
@ -100720,11 +100727,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkShaderInfoTypeAMD>( infoType ),
|
static_cast<VkShaderInfoTypeAMD>( infoType ),
|
||||||
&infoSize,
|
&infoSize,
|
||||||
reinterpret_cast<void *>( info.data() ) ) );
|
reinterpret_cast<void *>( info.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( infoSize <= info.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( infoSize < info.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( infoSize <= info.size() );
|
|
||||||
info.resize( infoSize );
|
info.resize( infoSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" );
|
return createResultValue( result, info, VULKAN_HPP_NAMESPACE_STRING "::Device::getShaderInfoAMD" );
|
||||||
@ -100868,15 +100875,16 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
return static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
return static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
||||||
m_device, static_cast<VkValidationCacheEXT>( validationCache ), pDataSize, pData ) );
|
m_device, static_cast<VkValidationCacheEXT>( validationCache ), pDataSize, pData ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE
|
||||||
template <typename Allocator, typename Dispatch>
|
template <typename Uint8_tAllocator, typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> data;
|
std::vector<uint8_t, Uint8_tAllocator> data;
|
||||||
size_t dataSize;
|
size_t dataSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
result = static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
||||||
@ -100889,27 +100897,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkValidationCacheEXT>( validationCache ),
|
static_cast<VkValidationCacheEXT>( validationCache ),
|
||||||
&dataSize,
|
&dataSize,
|
||||||
reinterpret_cast<void *>( data.data() ) ) );
|
reinterpret_cast<void *>( data.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
|
||||||
data.resize( dataSize );
|
data.resize( dataSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" );
|
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" );
|
||||||
}
|
}
|
||||||
template <typename Allocator,
|
|
||||||
|
template <typename Uint8_tAllocator,
|
||||||
typename Dispatch,
|
typename Dispatch,
|
||||||
typename B,
|
typename B,
|
||||||
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
typename std::enable_if<std::is_same<typename B::value_type, uint8_t>::value, int>::type>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Allocator>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<std::vector<uint8_t, Uint8_tAllocator>>::type
|
||||||
Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
Device::getValidationCacheDataEXT( VULKAN_HPP_NAMESPACE::ValidationCacheEXT validationCache,
|
||||||
Allocator const & vectorAllocator,
|
Uint8_tAllocator & uint8_tAllocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
std::vector<uint8_t, Allocator> data( vectorAllocator );
|
std::vector<uint8_t, Uint8_tAllocator> data( uint8_tAllocator );
|
||||||
size_t dataSize;
|
size_t dataSize;
|
||||||
Result result;
|
Result result;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
result = static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
result = static_cast<Result>( d.vkGetValidationCacheDataEXT(
|
||||||
@ -100922,11 +100931,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
static_cast<VkValidationCacheEXT>( validationCache ),
|
static_cast<VkValidationCacheEXT>( validationCache ),
|
||||||
&dataSize,
|
&dataSize,
|
||||||
reinterpret_cast<void *>( data.data() ) ) );
|
reinterpret_cast<void *>( data.data() ) ) );
|
||||||
|
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
||||||
}
|
}
|
||||||
} while ( result == Result::eIncomplete );
|
} while ( result == Result::eIncomplete );
|
||||||
if ( result == Result::eSuccess )
|
if ( ( result == Result::eSuccess ) && ( dataSize < data.size() ) )
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( dataSize <= data.size() );
|
|
||||||
data.resize( dataSize );
|
data.resize( dataSize );
|
||||||
}
|
}
|
||||||
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" );
|
return createResultValue( result, data, VULKAN_HPP_NAMESPACE_STRING "::Device::getValidationCacheDataEXT" );
|
||||||
|
Loading…
Reference in New Issue
Block a user