From ecea79660436d10f7845b4c4e1051bdf42922a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 19 Feb 2018 10:44:51 +0100 Subject: [PATCH] Fix wrong template argument in usage of ObjectDeleter for the create*Unique functions. (#184) --- VulkanHppGenerator.cpp | 2 +- vulkan/vulkan.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index f5eb999..ee6e835 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -3189,7 +3189,7 @@ ${i} return createResultValue( result, ${typeVariable}s, "VULKAN_HPP_NAMESPACE: { "command", startUpperCase(commandData.fullName) }, { "arguments", arguments.str() }, { "Deleter", ddit->second.pool.empty() ? "ObjectDeleter" : "PoolDeleter" }, - { "DeleterTemplate", ddit->second.pool.empty() ? type : commandData.className + "," + ddit->second.pool }, + { "DeleterTemplate", ddit->second.pool.empty() ? commandData.className : commandData.className + "," + ddit->second.pool }, { "deleterArg", ddit->second.pool.empty() ? "allocator" : "allocateInfo." + startLowerCase(ddit->second.pool) }, { "class", commandData.className }, { "function", commandData.reducedName } diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index c55be23..25928ba 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -30570,7 +30570,7 @@ public: Pipeline* buffer = reinterpret_cast( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); Result result = static_cast(d.vkCreateGraphicsPipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - ObjectDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i( reinterpret_cast( pipelines.data() ) + createInfos.size() * ( sizeof( UniquePipeline ) - sizeof( Pipeline ) ) ); Result result = static_cast(d.vkCreateComputePipelines( m_device, static_cast( pipelineCache ), createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - ObjectDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i( reinterpret_cast( swapchainKHRs.data() ) + createInfos.size() * ( sizeof( UniqueSwapchainKHR ) - sizeof( SwapchainKHR ) ) ); Result result = static_cast(d.vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( buffer ) ) ); - ObjectDeleter deleter( *this, allocator ); + ObjectDeleter deleter( *this, allocator ); for ( size_t i=0 ; i