mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Combine two types of commands into one generation function.
This commit is contained in:
parent
dbd8462d45
commit
956cda998b
@ -3743,66 +3743,6 @@ std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUnique( s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string VulkanHppGenerator::generateCommandResultGetVectorOfHandlesUniqueSingular( std::string const & name,
|
|
||||||
CommandData const & commandData,
|
|
||||||
size_t initialSkipCount,
|
|
||||||
bool definition,
|
|
||||||
std::map<size_t, size_t> const & vectorParams,
|
|
||||||
size_t returnParam ) const
|
|
||||||
{
|
|
||||||
assert( ( vectorParams.size() == 2 ) && ( vectorParams.begin()->second == std::next( vectorParams.begin() )->second ) );
|
|
||||||
assert( commandData.params[vectorParams.begin()->second].type.isValue() );
|
|
||||||
|
|
||||||
std::set<size_t> skippedParams = determineSkippedParams( commandData.params, initialSkipCount, vectorParams, { returnParam }, true );
|
|
||||||
std::set<size_t> singularParams = determineSingularParams( returnParam, vectorParams );
|
|
||||||
std::string argumentList = generateArgumentListEnhanced( commandData.params, skippedParams, singularParams, {}, definition, false, false, true );
|
|
||||||
std::string commandName = generateCommandName( name, commandData.params, initialSkipCount, m_tags, true, true );
|
|
||||||
std::string nodiscard = generateNoDiscard( true, 1 < commandData.successCodes.size(), 1 < commandData.errorCodes.size() );
|
|
||||||
std::string handleType = stripPrefix( commandData.params[returnParam].type.type, "Vk" );
|
|
||||||
std::string returnType = generateReturnType( commandData, { returnParam }, vectorParams, true, true, false, handleType );
|
|
||||||
|
|
||||||
if ( definition )
|
|
||||||
{
|
|
||||||
std::string const functionTemplate =
|
|
||||||
R"( template <typename Dispatch>
|
|
||||||
${nodiscard}VULKAN_HPP_INLINE ${returnType} ${className}${classSeparator}${commandName}( ${argumentList} ) const
|
|
||||||
{
|
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
|
||||||
${handleType} ${handleName};
|
|
||||||
Result result = static_cast<Result>( d.${vkCommand}( ${callArguments} ) );
|
|
||||||
ObjectDestroy<${className}, Dispatch> deleter( *this, allocator, d );
|
|
||||||
return createResultValue<${handleType}, Dispatch>( result, ${handleName}, VULKAN_HPP_NAMESPACE_STRING "::${className}${classSeparator}${commandName}"${successCodeList}, deleter );
|
|
||||||
})";
|
|
||||||
|
|
||||||
return replaceWithMap( functionTemplate,
|
|
||||||
{ { "argumentList", argumentList },
|
|
||||||
{ "callArguments", generateCallArgumentsEnhanced( commandData, initialSkipCount, false, singularParams, {}, false ) },
|
|
||||||
{ "className", initialSkipCount ? stripPrefix( commandData.params[initialSkipCount - 1].type.type, "Vk" ) : "" },
|
|
||||||
{ "classSeparator", commandData.handle.empty() ? "" : "::" },
|
|
||||||
{ "commandName", commandName },
|
|
||||||
{ "handleName", stripPluralS( startLowerCase( stripPrefix( commandData.params[returnParam].name, "p" ) ) ) },
|
|
||||||
{ "handleType", handleType },
|
|
||||||
{ "nodiscard", nodiscard },
|
|
||||||
{ "returnType", returnType },
|
|
||||||
{ "successCodeList", generateSuccessCodeList( commandData.successCodes ) },
|
|
||||||
{ "vkCommand", name } } );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::string const functionTemplate =
|
|
||||||
R"( template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
|
||||||
${nodiscard}${returnType} ${commandName}( ${argumentList} ) const;)";
|
|
||||||
|
|
||||||
return replaceWithMap( functionTemplate,
|
|
||||||
{
|
|
||||||
{ "argumentList", argumentList },
|
|
||||||
{ "commandName", commandName },
|
|
||||||
{ "nodiscard", nodiscard },
|
|
||||||
{ "returnType", returnType },
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string VulkanHppGenerator::generateCommandResultMultiSuccessNoErrors( std::string const & name,
|
std::string VulkanHppGenerator::generateCommandResultMultiSuccessNoErrors( std::string const & name,
|
||||||
CommandData const & commandData,
|
CommandData const & commandData,
|
||||||
size_t initialSkipCount,
|
size_t initialSkipCount,
|
||||||
@ -3925,7 +3865,7 @@ std::string VulkanHppGenerator::generateCommandResultMultiSuccessWithErrors1Retu
|
|||||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ),
|
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ),
|
||||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||||
generateCommandResultGetVectorOfHandlesUniqueSingular( name, commandData, initialSkipCount, definition, vectorParams, returnParam ) );
|
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, true ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4207,7 +4147,7 @@ std::string VulkanHppGenerator::generateCommandResultSingleSuccessWithErrors1Ret
|
|||||||
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ),
|
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, false ),
|
||||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, false ),
|
||||||
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
generateCommandResultGetVectorOfHandlesUnique( name, commandData, initialSkipCount, definition, vectorParams, returnParam, true ),
|
||||||
generateCommandResultGetVectorOfHandlesUniqueSingular( name, commandData, initialSkipCount, definition, vectorParams, returnParam ) );
|
generateCommandSingle( name, commandData, initialSkipCount, definition, vectorParams, { returnParam }, true, false, false, true ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10197,11 +10137,18 @@ std::string VulkanHppGenerator::generateReturnStatement( std::string const & com
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert( !unique );
|
|
||||||
if ( returnVariable.empty() )
|
if ( returnVariable.empty() )
|
||||||
{
|
{
|
||||||
|
assert( !unique );
|
||||||
returnStatement = "return static_cast<VULKAN_HPP_NAMESPACE::" + stripPrefix( commandData.returnType, "Vk" ) + ">( result );";
|
returnStatement = "return static_cast<VULKAN_HPP_NAMESPACE::" + stripPrefix( commandData.returnType, "Vk" ) + ">( result );";
|
||||||
}
|
}
|
||||||
|
else if ( unique )
|
||||||
|
{
|
||||||
|
assert( returnParam != INVALID_INDEX );
|
||||||
|
assert( beginsWith( returnType, "ResultValue<" ) && endsWith( returnType, ">" ) );
|
||||||
|
returnStatement = "return " + returnType + "( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), UniqueHandle<" + dataType + ", Dispatch>( " +
|
||||||
|
returnVariable + ", " + generateObjectDeleter( commandName, commandData, initialSkipCount, returnParam ) + " ) );";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert( beginsWith( returnType, "ResultValue<" ) && endsWith( returnType, ">" ) );
|
assert( beginsWith( returnType, "ResultValue<" ) && endsWith( returnType, ">" ) );
|
||||||
@ -16807,43 +16754,6 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_NO_SMART_HANDLE
|
#ifndef VULKAN_HPP_NO_SMART_HANDLE
|
||||||
template <typename T, typename D>
|
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<T,D>>::type createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits<T,D>::deleter const & deleter )
|
|
||||||
{
|
|
||||||
#ifdef VULKAN_HPP_NO_EXCEPTIONS
|
|
||||||
ignore(message);
|
|
||||||
VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess );
|
|
||||||
return ResultValue<UniqueHandle<T,D>>( result, UniqueHandle<T,D>(data, deleter ) );
|
|
||||||
#else
|
|
||||||
if ( result != Result::eSuccess )
|
|
||||||
{
|
|
||||||
throwResultException( result, message );
|
|
||||||
}
|
|
||||||
return UniqueHandle<T,D>(data, deleter );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, typename D>
|
|
||||||
VULKAN_HPP_INLINE ResultValue<UniqueHandle<T, D>>
|
|
||||||
createResultValue( Result result,
|
|
||||||
T & data,
|
|
||||||
char const * message,
|
|
||||||
std::initializer_list<Result> successCodes,
|
|
||||||
typename UniqueHandleTraits<T, D>::deleter const & deleter )
|
|
||||||
{
|
|
||||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
|
||||||
ignore( message );
|
|
||||||
ignore(successCodes); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty
|
|
||||||
VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
|
||||||
# else
|
|
||||||
if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
|
|
||||||
{
|
|
||||||
throwResultException( result, message );
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
return ResultValue<UniqueHandle<T, D>>( result, UniqueHandle<T, D>( data, deleter ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, typename D, typename Allocator = std::allocator<UniqueHandle<T, D>>>
|
template <typename T, typename D, typename Allocator = std::allocator<UniqueHandle<T, D>>>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<T, D>, Allocator>>::type
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<T, D>, Allocator>>::type
|
||||||
createResultValue( Result result, std::vector<UniqueHandle<T, D>, Allocator> && data, char const * message )
|
createResultValue( Result result, std::vector<UniqueHandle<T, D>, Allocator> && data, char const * message )
|
||||||
|
@ -506,12 +506,6 @@ private:
|
|||||||
std::map<size_t, size_t> const & vectorParamIndices,
|
std::map<size_t, size_t> const & vectorParamIndices,
|
||||||
size_t returnParam,
|
size_t returnParam,
|
||||||
bool withAllocator ) const;
|
bool withAllocator ) const;
|
||||||
std::string generateCommandResultGetVectorOfHandlesUniqueSingular( std::string const & name,
|
|
||||||
CommandData const & commandData,
|
|
||||||
size_t initialSkipCount,
|
|
||||||
bool definition,
|
|
||||||
std::map<size_t, size_t> const & vectorParamIndices,
|
|
||||||
size_t returnParam ) const;
|
|
||||||
std::string
|
std::string
|
||||||
generateCommandResultMultiSuccessNoErrors( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition ) const;
|
generateCommandResultMultiSuccessNoErrors( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition ) const;
|
||||||
std::string generateCommandResultMultiSuccessNoErrors0Return( std::string const & name,
|
std::string generateCommandResultMultiSuccessNoErrors0Return( std::string const & name,
|
||||||
|
@ -5984,40 +5984,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VULKAN_HPP_NO_SMART_HANDLE
|
#ifndef VULKAN_HPP_NO_SMART_HANDLE
|
||||||
template <typename T, typename D>
|
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<T, D>>::type
|
|
||||||
createResultValue( Result result, T & data, char const * message, typename UniqueHandleTraits<T, D>::deleter const & deleter )
|
|
||||||
{
|
|
||||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
|
||||||
ignore( message );
|
|
||||||
VULKAN_HPP_ASSERT_ON_RESULT( result == Result::eSuccess );
|
|
||||||
return ResultValue<UniqueHandle<T, D>>( result, UniqueHandle<T, D>( data, deleter ) );
|
|
||||||
# else
|
|
||||||
if ( result != Result::eSuccess )
|
|
||||||
{
|
|
||||||
throwResultException( result, message );
|
|
||||||
}
|
|
||||||
return UniqueHandle<T, D>( data, deleter );
|
|
||||||
# endif
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, typename D>
|
|
||||||
VULKAN_HPP_INLINE ResultValue<UniqueHandle<T, D>> createResultValue(
|
|
||||||
Result result, T & data, char const * message, std::initializer_list<Result> successCodes, typename UniqueHandleTraits<T, D>::deleter const & deleter )
|
|
||||||
{
|
|
||||||
# ifdef VULKAN_HPP_NO_EXCEPTIONS
|
|
||||||
ignore( message );
|
|
||||||
ignore( successCodes ); // just in case VULKAN_HPP_ASSERT_ON_RESULT is empty
|
|
||||||
VULKAN_HPP_ASSERT_ON_RESULT( std::find( successCodes.begin(), successCodes.end(), result ) != successCodes.end() );
|
|
||||||
# else
|
|
||||||
if ( std::find( successCodes.begin(), successCodes.end(), result ) == successCodes.end() )
|
|
||||||
{
|
|
||||||
throwResultException( result, message );
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
return ResultValue<UniqueHandle<T, D>>( result, UniqueHandle<T, D>( data, deleter ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, typename D, typename Allocator = std::allocator<UniqueHandle<T, D>>>
|
template <typename T, typename D, typename Allocator = std::allocator<UniqueHandle<T, D>>>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<T, D>, Allocator>>::type
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<T, D>, Allocator>>::type
|
||||||
createResultValue( Result result, std::vector<UniqueHandle<T, D>, Allocator> && data, char const * message )
|
createResultValue( Result result, std::vector<UniqueHandle<T, D>, Allocator> && data, char const * message )
|
||||||
|
@ -2782,27 +2782,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
Device::createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
Device::createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo,
|
const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
Pipeline pipeline;
|
|
||||||
Result result = static_cast<Result>( d.vkCreateGraphicsPipelines(
|
VULKAN_HPP_NAMESPACE::Pipeline pipeline;
|
||||||
|
VkResult result = d.vkCreateGraphicsPipelines(
|
||||||
m_device,
|
m_device,
|
||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
1,
|
1,
|
||||||
reinterpret_cast<const VkGraphicsPipelineCreateInfo *>( &createInfo ),
|
reinterpret_cast<const VkGraphicsPipelineCreateInfo *>( &createInfo ),
|
||||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||||
reinterpret_cast<VkPipeline *>( &pipeline ) ) );
|
reinterpret_cast<VkPipeline *>( &pipeline ) );
|
||||||
ObjectDestroy<Device, Dispatch> deleter( *this, allocator, d );
|
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
return createResultValue<Pipeline, Dispatch>( result,
|
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique",
|
||||||
pipeline,
|
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelineUnique",
|
return ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>(
|
||||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT },
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
deleter );
|
UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>( pipeline, ObjectDestroy<Device, Dispatch>( *this, allocator, d ) ) );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -2968,27 +2969,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
Device::createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
Device::createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo,
|
const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
Pipeline pipeline;
|
|
||||||
Result result = static_cast<Result>( d.vkCreateComputePipelines(
|
VULKAN_HPP_NAMESPACE::Pipeline pipeline;
|
||||||
|
VkResult result = d.vkCreateComputePipelines(
|
||||||
m_device,
|
m_device,
|
||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
1,
|
1,
|
||||||
reinterpret_cast<const VkComputePipelineCreateInfo *>( &createInfo ),
|
reinterpret_cast<const VkComputePipelineCreateInfo *>( &createInfo ),
|
||||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||||
reinterpret_cast<VkPipeline *>( &pipeline ) ) );
|
reinterpret_cast<VkPipeline *>( &pipeline ) );
|
||||||
ObjectDestroy<Device, Dispatch> deleter( *this, allocator, d );
|
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
return createResultValue<Pipeline, Dispatch>( result,
|
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique",
|
||||||
pipeline,
|
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelineUnique",
|
return ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>(
|
||||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT },
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
deleter );
|
UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>( pipeline, ObjectDestroy<Device, Dispatch>( *this, allocator, d ) ) );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -8453,21 +8455,24 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<SwapchainKHR, Dispatch>>::type
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::SwapchainKHR, Dispatch>>::type
|
||||||
Device::createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo,
|
Device::createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
SwapchainKHR swapchain;
|
|
||||||
Result result = static_cast<Result>( d.vkCreateSharedSwapchainsKHR(
|
VULKAN_HPP_NAMESPACE::SwapchainKHR swapchain;
|
||||||
|
VkResult result = d.vkCreateSharedSwapchainsKHR(
|
||||||
m_device,
|
m_device,
|
||||||
1,
|
1,
|
||||||
reinterpret_cast<const VkSwapchainCreateInfoKHR *>( &createInfo ),
|
reinterpret_cast<const VkSwapchainCreateInfoKHR *>( &createInfo ),
|
||||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||||
reinterpret_cast<VkSwapchainKHR *>( &swapchain ) ) );
|
reinterpret_cast<VkSwapchainKHR *>( &swapchain ) );
|
||||||
ObjectDestroy<Device, Dispatch> deleter( *this, allocator, d );
|
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ), VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique" );
|
||||||
return createResultValue<SwapchainKHR, Dispatch>( result, swapchain, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainKHRUnique", deleter );
|
return createResultValueType(
|
||||||
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
|
UniqueHandle<VULKAN_HPP_NAMESPACE::SwapchainKHR, Dispatch>( swapchain, ObjectDestroy<Device, Dispatch>( *this, allocator, d ) ) );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -14795,27 +14800,28 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
Device::createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
Device::createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo,
|
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator,
|
||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
Pipeline pipeline;
|
|
||||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesNV(
|
VULKAN_HPP_NAMESPACE::Pipeline pipeline;
|
||||||
|
VkResult result = d.vkCreateRayTracingPipelinesNV(
|
||||||
m_device,
|
m_device,
|
||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
1,
|
1,
|
||||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoNV *>( &createInfo ),
|
reinterpret_cast<const VkRayTracingPipelineCreateInfoNV *>( &createInfo ),
|
||||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||||
reinterpret_cast<VkPipeline *>( &pipeline ) ) );
|
reinterpret_cast<VkPipeline *>( &pipeline ) );
|
||||||
ObjectDestroy<Device, Dispatch> deleter( *this, allocator, d );
|
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
return createResultValue<Pipeline, Dispatch>( result,
|
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNVUnique",
|
||||||
pipeline,
|
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineNVUnique",
|
return ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>(
|
||||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess, VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT },
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
deleter );
|
UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>( pipeline, ObjectDestroy<Device, Dispatch>( *this, allocator, d ) ) );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
@ -18164,7 +18170,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Dispatch>
|
template <typename Dispatch>
|
||||||
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
Device::createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation,
|
Device::createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation,
|
||||||
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo,
|
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo,
|
||||||
@ -18172,24 +18178,25 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
Dispatch const & d ) const
|
Dispatch const & d ) const
|
||||||
{
|
{
|
||||||
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
|
||||||
Pipeline pipeline;
|
|
||||||
Result result = static_cast<Result>( d.vkCreateRayTracingPipelinesKHR(
|
VULKAN_HPP_NAMESPACE::Pipeline pipeline;
|
||||||
|
VkResult result = d.vkCreateRayTracingPipelinesKHR(
|
||||||
m_device,
|
m_device,
|
||||||
static_cast<VkDeferredOperationKHR>( deferredOperation ),
|
static_cast<VkDeferredOperationKHR>( deferredOperation ),
|
||||||
static_cast<VkPipelineCache>( pipelineCache ),
|
static_cast<VkPipelineCache>( pipelineCache ),
|
||||||
1,
|
1,
|
||||||
reinterpret_cast<const VkRayTracingPipelineCreateInfoKHR *>( &createInfo ),
|
reinterpret_cast<const VkRayTracingPipelineCreateInfoKHR *>( &createInfo ),
|
||||||
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
reinterpret_cast<const VkAllocationCallbacks *>( static_cast<const VULKAN_HPP_NAMESPACE::AllocationCallbacks *>( allocator ) ),
|
||||||
reinterpret_cast<VkPipeline *>( &pipeline ) ) );
|
reinterpret_cast<VkPipeline *>( &pipeline ) );
|
||||||
ObjectDestroy<Device, Dispatch> deleter( *this, allocator, d );
|
resultCheck( static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
return createResultValue<Pipeline, Dispatch>( result,
|
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHRUnique",
|
||||||
pipeline,
|
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
||||||
VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelineKHRUnique",
|
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
||||||
{ VULKAN_HPP_NAMESPACE::Result::eSuccess,
|
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
||||||
VULKAN_HPP_NAMESPACE::Result::eOperationDeferredKHR,
|
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT } );
|
||||||
VULKAN_HPP_NAMESPACE::Result::eOperationNotDeferredKHR,
|
return ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>(
|
||||||
VULKAN_HPP_NAMESPACE::Result::ePipelineCompileRequiredEXT },
|
static_cast<VULKAN_HPP_NAMESPACE::Result>( result ),
|
||||||
deleter );
|
UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>( pipeline, ObjectDestroy<Device, Dispatch>( *this, allocator, d ) ) );
|
||||||
}
|
}
|
||||||
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
# endif /*VULKAN_HPP_NO_SMART_HANDLE*/
|
||||||
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
|
||||||
|
@ -7961,7 +7961,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
PipelineAllocator & pipelineAllocator,
|
PipelineAllocator & pipelineAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
createGraphicsPipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo,
|
const VULKAN_HPP_NAMESPACE::GraphicsPipelineCreateInfo & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||||
@ -8017,7 +8017,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
PipelineAllocator & pipelineAllocator,
|
PipelineAllocator & pipelineAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
createComputePipelineUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo,
|
const VULKAN_HPP_NAMESPACE::ComputePipelineCreateInfo & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||||
@ -9080,7 +9080,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
SwapchainKHRAllocator & swapchainKHRAllocator,
|
SwapchainKHRAllocator & swapchainKHRAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD typename ResultValueType<UniqueHandle<SwapchainKHR, Dispatch>>::type
|
VULKAN_HPP_NODISCARD typename ResultValueType<UniqueHandle<VULKAN_HPP_NAMESPACE::SwapchainKHR, Dispatch>>::type
|
||||||
createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo,
|
createSharedSwapchainKHRUnique( const VULKAN_HPP_NAMESPACE::SwapchainCreateInfoKHR & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
@ -10293,7 +10293,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
PipelineAllocator & pipelineAllocator,
|
PipelineAllocator & pipelineAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
createRayTracingPipelineNVUnique( VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo,
|
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoNV & createInfo,
|
||||||
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||||
@ -10921,7 +10921,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
PipelineAllocator & pipelineAllocator,
|
PipelineAllocator & pipelineAllocator,
|
||||||
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
Dispatch const & d VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) const;
|
||||||
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
template <typename Dispatch = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||||
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<Pipeline, Dispatch>>
|
VULKAN_HPP_NODISCARD ResultValue<UniqueHandle<VULKAN_HPP_NAMESPACE::Pipeline, Dispatch>>
|
||||||
createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation,
|
createRayTracingPipelineKHRUnique( VULKAN_HPP_NAMESPACE::DeferredOperationKHR deferredOperation,
|
||||||
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
VULKAN_HPP_NAMESPACE::PipelineCache pipelineCache,
|
||||||
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo,
|
const VULKAN_HPP_NAMESPACE::RayTracingPipelineCreateInfoKHR & createInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user