Correct usage of UniqueHandle<Type,Dispatch> in functions returning vectors of UniqueHandle<Type>. (#278)

This commit is contained in:
Andreas Süßenbach
2018-12-05 15:53:55 +01:00
committed by Markus Tavenrath
parent e765318a3d
commit b4080fb425
3 changed files with 56 additions and 53 deletions

View File

@@ -50,6 +50,9 @@ int main(int /*argc*/, char * /*argv[]*/)
std::vector<vk::UniqueCommandBuffer>::allocator_type vectorAllocator;
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)
{