mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Correct usage of UniqueHandle<Type,Dispatch> in functions returning vectors of UniqueHandle<Type>. (#278)
This commit is contained in:
parent
e765318a3d
commit
b4080fb425
@ -3014,7 +3014,7 @@ void VulkanHppGenerator::sortDependencies()
|
|||||||
{
|
{
|
||||||
std::map<std::string, StructData>::const_iterator sit = std::find_if(m_structs.begin(), m_structs.end(), [&dit](std::pair<std::string, StructData> const& sd) { return sd.second.alias == *dit; });
|
std::map<std::string, StructData>::const_iterator sit = std::find_if(m_structs.begin(), m_structs.end(), [&dit](std::pair<std::string, StructData> const& sd) { return sd.second.alias == *dit; });
|
||||||
assert(sit != m_structs.end());
|
assert(sit != m_structs.end());
|
||||||
assert(std::find_if(sortedDependencies.begin(), sortedDependencies.end(), [name = sit->first](DependencyData const& dd) { return dd.name == name; }) != sortedDependencies.end());
|
assert(std::find_if(sortedDependencies.begin(), sortedDependencies.end(), [sit](DependencyData const& dd) { return dd.name == sit->first; }) != sortedDependencies.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3368,16 +3368,16 @@ void VulkanHppGenerator::writeFunctionBodyEnhanced(std::ostream & os, std::strin
|
|||||||
if (unique && !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end())) // returns a vector of UniqueStuff
|
if (unique && !singular && (commandData.vectorParams.find(commandData.returnParam) != commandData.vectorParams.end())) // returns a vector of UniqueStuff
|
||||||
{
|
{
|
||||||
std::string const stringTemplate =
|
std::string const stringTemplate =
|
||||||
R"(${i} static_assert( sizeof( ${type} ) <= sizeof( Unique${type} ), "${type} is greater than Unique${type}!" );
|
R"(${i} static_assert( sizeof( ${type} ) <= sizeof( UniqueHandle<${type}, Dispatch> ), "${type} is greater than UniqueHandle<${type}, Dispatch>!" );
|
||||||
${i} std::vector<Unique${type}, Allocator> ${typeVariable}s${allocator};
|
${i} std::vector<UniqueHandle<${type}, Dispatch>, Allocator> ${typeVariable}s${allocator};
|
||||||
${i} ${typeVariable}s.reserve( ${vectorSize} );
|
${i} ${typeVariable}s.reserve( ${vectorSize} );
|
||||||
${i} ${type}* buffer = reinterpret_cast<${type}*>( reinterpret_cast<char*>( ${typeVariable}s.data() ) + ${vectorSize} * ( sizeof( Unique${type} ) - sizeof( ${type} ) ) );
|
${i} ${type}* buffer = reinterpret_cast<${type}*>( reinterpret_cast<char*>( ${typeVariable}s.data() ) + ${vectorSize} * ( sizeof( UniqueHandle<${type}, Dispatch> ) - sizeof( ${type} ) ) );
|
||||||
${i} Result result = static_cast<Result>(d.vk${command}( m_device, ${arguments}, reinterpret_cast<Vk${type}*>( buffer ) ) );
|
${i} Result result = static_cast<Result>(d.vk${command}( m_device, ${arguments}, reinterpret_cast<Vk${type}*>( buffer ) ) );
|
||||||
|
|
||||||
${i} ${Deleter}<${DeleterTemplate},Dispatch> deleter( *this, ${deleterArg}, d );
|
${i} ${Deleter}<${DeleterTemplate},Dispatch> deleter( *this, ${deleterArg}, d );
|
||||||
${i} for ( size_t i=0 ; i<${vectorSize} ; i++ )
|
${i} for ( size_t i=0 ; i<${vectorSize} ; i++ )
|
||||||
${i} {
|
${i} {
|
||||||
${i} ${typeVariable}s.push_back( Unique${type}( buffer[i], deleter ) );
|
${i} ${typeVariable}s.push_back( UniqueHandle<${type}, Dispatch>( buffer[i], deleter ) );
|
||||||
${i} }
|
${i} }
|
||||||
|
|
||||||
${i} return createResultValue( result, ${typeVariable}s, VULKAN_HPP_NAMESPACE_STRING "::${class}::${function}Unique" );
|
${i} return createResultValue( result, ${typeVariable}s, VULKAN_HPP_NAMESPACE_STRING "::${class}::${function}Unique" );
|
||||||
|
@ -50,6 +50,9 @@ int main(int /*argc*/, char * /*argv[]*/)
|
|||||||
|
|
||||||
std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator;
|
std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator;
|
||||||
std::vector<vk::UniqueCommandBuffer> commandBuffers = device->allocateCommandBuffersUnique({}, vectorAllocator, vk::DispatchLoaderStatic());
|
std::vector<vk::UniqueCommandBuffer> commandBuffers = device->allocateCommandBuffersUnique({}, vectorAllocator, vk::DispatchLoaderStatic());
|
||||||
|
|
||||||
|
std::vector<vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic>>::allocator_type dynamicVectorAllocator;
|
||||||
|
std::vector<vk::UniqueHandle<vk::CommandBuffer, vk::DispatchLoaderDynamic>> dynamicCommandBuffers = device->allocateCommandBuffersUnique({}, dynamicVectorAllocator, vk::DispatchLoaderDynamic());
|
||||||
}
|
}
|
||||||
catch (vk::SystemError err)
|
catch (vk::SystemError err)
|
||||||
{
|
{
|
||||||
|
@ -42837,16 +42837,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines;
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
|
||||||
@ -42854,16 +42854,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const GraphicsPipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines( vectorAllocator );
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateGraphicsPipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkGraphicsPipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createGraphicsPipelinesUnique" );
|
||||||
@ -42911,16 +42911,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines;
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
|
||||||
@ -42928,16 +42928,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy<const ComputePipelineCreateInfo> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines( vectorAllocator );
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateComputePipelines( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkComputePipelineCreateInfo*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createComputePipelinesUnique" );
|
||||||
@ -43227,16 +43227,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueDescriptorSet ), "DescriptorSet is greater than UniqueDescriptorSet!" );
|
static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueHandle<DescriptorSet, Dispatch> ), "DescriptorSet is greater than UniqueHandle<DescriptorSet, Dispatch>!" );
|
||||||
std::vector<UniqueDescriptorSet, Allocator> descriptorSets;
|
std::vector<UniqueHandle<DescriptorSet, Dispatch>, Allocator> descriptorSets;
|
||||||
descriptorSets.reserve( allocateInfo.descriptorSetCount );
|
descriptorSets.reserve( allocateInfo.descriptorSetCount );
|
||||||
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) );
|
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueHandle<DescriptorSet, Dispatch> ) - sizeof( DescriptorSet ) ) );
|
||||||
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
|
||||||
|
|
||||||
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
|
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
|
||||||
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
|
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
|
||||||
{
|
{
|
||||||
descriptorSets.push_back( UniqueDescriptorSet( buffer[i], deleter ) );
|
descriptorSets.push_back( UniqueHandle<DescriptorSet, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
|
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
|
||||||
@ -43244,16 +43244,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<DescriptorSet,Dispatch>,Allocator>>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueDescriptorSet ), "DescriptorSet is greater than UniqueDescriptorSet!" );
|
static_assert( sizeof( DescriptorSet ) <= sizeof( UniqueHandle<DescriptorSet, Dispatch> ), "DescriptorSet is greater than UniqueHandle<DescriptorSet, Dispatch>!" );
|
||||||
std::vector<UniqueDescriptorSet, Allocator> descriptorSets( vectorAllocator );
|
std::vector<UniqueHandle<DescriptorSet, Dispatch>, Allocator> descriptorSets( vectorAllocator );
|
||||||
descriptorSets.reserve( allocateInfo.descriptorSetCount );
|
descriptorSets.reserve( allocateInfo.descriptorSetCount );
|
||||||
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueDescriptorSet ) - sizeof( DescriptorSet ) ) );
|
DescriptorSet* buffer = reinterpret_cast<DescriptorSet*>( reinterpret_cast<char*>( descriptorSets.data() ) + allocateInfo.descriptorSetCount * ( sizeof( UniqueHandle<DescriptorSet, Dispatch> ) - sizeof( DescriptorSet ) ) );
|
||||||
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkAllocateDescriptorSets( m_device, reinterpret_cast<const VkDescriptorSetAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkDescriptorSet*>( buffer ) ) );
|
||||||
|
|
||||||
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
|
PoolFree<Device,DescriptorPool,Dispatch> deleter( *this, allocateInfo.descriptorPool, d );
|
||||||
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
|
for ( size_t i=0 ; i<allocateInfo.descriptorSetCount ; i++ )
|
||||||
{
|
{
|
||||||
descriptorSets.push_back( UniqueDescriptorSet( buffer[i], deleter ) );
|
descriptorSets.push_back( UniqueHandle<DescriptorSet, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
|
return createResultValue( result, descriptorSets, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateDescriptorSetsUnique" );
|
||||||
@ -43512,16 +43512,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueCommandBuffer ), "CommandBuffer is greater than UniqueCommandBuffer!" );
|
static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueHandle<CommandBuffer, Dispatch> ), "CommandBuffer is greater than UniqueHandle<CommandBuffer, Dispatch>!" );
|
||||||
std::vector<UniqueCommandBuffer, Allocator> commandBuffers;
|
std::vector<UniqueHandle<CommandBuffer, Dispatch>, Allocator> commandBuffers;
|
||||||
commandBuffers.reserve( allocateInfo.commandBufferCount );
|
commandBuffers.reserve( allocateInfo.commandBufferCount );
|
||||||
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) );
|
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueHandle<CommandBuffer, Dispatch> ) - sizeof( CommandBuffer ) ) );
|
||||||
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
|
||||||
|
|
||||||
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
|
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
|
||||||
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
|
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
|
||||||
{
|
{
|
||||||
commandBuffers.push_back( UniqueCommandBuffer( buffer[i], deleter ) );
|
commandBuffers.push_back( UniqueHandle<CommandBuffer, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
|
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
|
||||||
@ -43529,16 +43529,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<CommandBuffer,Dispatch>,Allocator>>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueCommandBuffer ), "CommandBuffer is greater than UniqueCommandBuffer!" );
|
static_assert( sizeof( CommandBuffer ) <= sizeof( UniqueHandle<CommandBuffer, Dispatch> ), "CommandBuffer is greater than UniqueHandle<CommandBuffer, Dispatch>!" );
|
||||||
std::vector<UniqueCommandBuffer, Allocator> commandBuffers( vectorAllocator );
|
std::vector<UniqueHandle<CommandBuffer, Dispatch>, Allocator> commandBuffers( vectorAllocator );
|
||||||
commandBuffers.reserve( allocateInfo.commandBufferCount );
|
commandBuffers.reserve( allocateInfo.commandBufferCount );
|
||||||
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueCommandBuffer ) - sizeof( CommandBuffer ) ) );
|
CommandBuffer* buffer = reinterpret_cast<CommandBuffer*>( reinterpret_cast<char*>( commandBuffers.data() ) + allocateInfo.commandBufferCount * ( sizeof( UniqueHandle<CommandBuffer, Dispatch> ) - sizeof( CommandBuffer ) ) );
|
||||||
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkAllocateCommandBuffers( m_device, reinterpret_cast<const VkCommandBufferAllocateInfo*>( &allocateInfo ), reinterpret_cast<VkCommandBuffer*>( buffer ) ) );
|
||||||
|
|
||||||
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
|
PoolFree<Device,CommandPool,Dispatch> deleter( *this, allocateInfo.commandPool, d );
|
||||||
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
|
for ( size_t i=0 ; i<allocateInfo.commandBufferCount ; i++ )
|
||||||
{
|
{
|
||||||
commandBuffers.push_back( UniqueCommandBuffer( buffer[i], deleter ) );
|
commandBuffers.push_back( UniqueHandle<CommandBuffer, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
|
return createResultValue( result, commandBuffers, VULKAN_HPP_NAMESPACE_STRING "::Device::allocateCommandBuffersUnique" );
|
||||||
@ -43603,16 +43603,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueSwapchainKHR ), "SwapchainKHR is greater than UniqueSwapchainKHR!" );
|
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueHandle<SwapchainKHR, Dispatch> ), "SwapchainKHR is greater than UniqueHandle<SwapchainKHR, Dispatch>!" );
|
||||||
std::vector<UniqueSwapchainKHR, Allocator> swapchainKHRs;
|
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, Allocator> swapchainKHRs;
|
||||||
swapchainKHRs.reserve( createInfos.size() );
|
swapchainKHRs.reserve( createInfos.size() );
|
||||||
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) );
|
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueHandle<SwapchainKHR, Dispatch> ) - sizeof( SwapchainKHR ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
swapchainKHRs.push_back( UniqueSwapchainKHR( buffer[i], deleter ) );
|
swapchainKHRs.push_back( UniqueHandle<SwapchainKHR, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
|
return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
|
||||||
@ -43620,16 +43620,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<SwapchainKHR,Dispatch>,Allocator>>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy<const SwapchainCreateInfoKHR> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueSwapchainKHR ), "SwapchainKHR is greater than UniqueSwapchainKHR!" );
|
static_assert( sizeof( SwapchainKHR ) <= sizeof( UniqueHandle<SwapchainKHR, Dispatch> ), "SwapchainKHR is greater than UniqueHandle<SwapchainKHR, Dispatch>!" );
|
||||||
std::vector<UniqueSwapchainKHR, Allocator> swapchainKHRs( vectorAllocator );
|
std::vector<UniqueHandle<SwapchainKHR, Dispatch>, Allocator> swapchainKHRs( vectorAllocator );
|
||||||
swapchainKHRs.reserve( createInfos.size() );
|
swapchainKHRs.reserve( createInfos.size() );
|
||||||
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) );
|
SwapchainKHR* buffer = reinterpret_cast<SwapchainKHR*>( reinterpret_cast<char*>( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueHandle<SwapchainKHR, Dispatch> ) - sizeof( SwapchainKHR ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast<const VkSwapchainCreateInfoKHR*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkSwapchainKHR*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
swapchainKHRs.push_back( UniqueSwapchainKHR( buffer[i], deleter ) );
|
swapchainKHRs.push_back( UniqueHandle<SwapchainKHR, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
|
return createResultValue( result, swapchainKHRs, VULKAN_HPP_NAMESPACE_STRING "::Device::createSharedSwapchainsKHRUnique" );
|
||||||
@ -45345,16 +45345,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines;
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines;
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
|
||||||
@ -45362,16 +45362,16 @@ public:
|
|||||||
template <typename Allocator, typename Dispatch>
|
template <typename Allocator, typename Dispatch>
|
||||||
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
VULKAN_HPP_INLINE typename ResultValueType<std::vector<UniqueHandle<Pipeline,Dispatch>,Allocator>>::type Device::createRayTracingPipelinesNVUnique( PipelineCache pipelineCache, ArrayProxy<const RayTracingPipelineCreateInfoNV> createInfos, Optional<const AllocationCallbacks> allocator, Allocator const& vectorAllocator, Dispatch const &d ) const
|
||||||
{
|
{
|
||||||
static_assert( sizeof( Pipeline ) <= sizeof( UniquePipeline ), "Pipeline is greater than UniquePipeline!" );
|
static_assert( sizeof( Pipeline ) <= sizeof( UniqueHandle<Pipeline, Dispatch> ), "Pipeline is greater than UniqueHandle<Pipeline, Dispatch>!" );
|
||||||
std::vector<UniquePipeline, Allocator> pipelines( vectorAllocator );
|
std::vector<UniqueHandle<Pipeline, Dispatch>, Allocator> pipelines( vectorAllocator );
|
||||||
pipelines.reserve( createInfos.size() );
|
pipelines.reserve( createInfos.size() );
|
||||||
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) );
|
Pipeline* buffer = reinterpret_cast<Pipeline*>( reinterpret_cast<char*>( pipelines.data() ) + createInfos.size() * ( sizeof( UniqueHandle<Pipeline, Dispatch> ) - sizeof( Pipeline ) ) );
|
||||||
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
Result result = static_cast<Result>(d.vkCreateRayTracingPipelinesNV( m_device, static_cast<VkPipelineCache>( pipelineCache ), createInfos.size() , reinterpret_cast<const VkRayTracingPipelineCreateInfoNV*>( createInfos.data() ), reinterpret_cast<const VkAllocationCallbacks*>( static_cast<const AllocationCallbacks*>( allocator ) ), reinterpret_cast<VkPipeline*>( buffer ) ) );
|
||||||
|
|
||||||
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
ObjectDestroy<Device,Dispatch> deleter( *this, allocator, d );
|
||||||
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
for ( size_t i=0 ; i<createInfos.size() ; i++ )
|
||||||
{
|
{
|
||||||
pipelines.push_back( UniquePipeline( buffer[i], deleter ) );
|
pipelines.push_back( UniqueHandle<Pipeline, Dispatch>( buffer[i], deleter ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
|
return createResultValue( result, pipelines, VULKAN_HPP_NAMESPACE_STRING "::Device::createRayTracingPipelinesNVUnique" );
|
||||||
|
Loading…
Reference in New Issue
Block a user