Skip to content

Commit

Permalink
Remove special assertion on eFreeDescriptorSet in function Device::cr…
Browse files Browse the repository at this point in the history
…eateDescriptorPool (#2038)
  • Loading branch information
asuessenbach authored Jan 8, 2025
1 parent 7527784 commit ed47b1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
19 changes: 5 additions & 14 deletions VulkanHppGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9349,10 +9349,10 @@ std::string VulkanHppGenerator::generateRAIIHandle( std::pair<std::string, Handl

void swap( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::${handleType} & rhs ) VULKAN_HPP_NOEXCEPT
{
${swapMembers}
${swapMembers}
}

${memberFunctionsDeclarations}
${memberFunctionsDeclarations}

private:
${memberVariables}
Expand Down Expand Up @@ -9706,13 +9706,6 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co
vulkanType = commandData.params[returnParams.back()].type.type;
}

// some special handling for vkCreateDescriptorPool: not to have this flag set!
std::string specialAssertion;
if ( name == "vkCreateDescriptorPool" )
{
specialAssertion =
"VULKAN_HPP_ASSERT( createInfo.flags & vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet && \"createInfo.flags need to have vk::DescriptorPoolCreateFlagBits::eFreeDesriptors set in order to allow destruction of VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSet which requires to return individual allocations to the pool\" );";
}
std::string dataDeclarations =
generateDataDeclarations( commandData, returnParams, vectorParams, {}, flavourFlags, true, dataTypes, dataType, returnType, returnVariable );
std::string callSequence =
Expand All @@ -9725,7 +9718,6 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co
R"(
VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::detail::CreateReturnType<${returnType}>::Type ${className}::${commandName}( ${argumentList} ) const ${noexcept}
{
${specialAssertion}
${dataDeclarations}
${callSequence}
${resultCheck}
Expand All @@ -9742,8 +9734,7 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandFactory( std::string co
{ "noexcept", noexceptString },
{ "resultCheck", resultCheck },
{ "returnStatements", returnStatements },
{ "returnType", returnType },
{ "specialAssertion", specialAssertion } } );
{ "returnType", returnType } } );
}
else
{
Expand Down Expand Up @@ -13628,11 +13619,11 @@ bool VulkanHppGenerator::handleRemovalType( std::string const & type, std::vecto
return removed;
}

bool VulkanHppGenerator::hasArrayConstructor(HandleData const& handleData) const
bool VulkanHppGenerator::hasArrayConstructor( HandleData const & handleData ) const
{
for ( auto constructorIt : handleData.constructorIts )
{
if (!determineVectorParams(constructorIt->second.params).empty())
if ( !determineVectorParams( constructorIt->second.params ).empty() )
{
return true;
}
Expand Down
3 changes: 0 additions & 3 deletions vulkan/vulkan_raii.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14154,9 +14154,6 @@ namespace VULKAN_HPP_NAMESPACE
VULKAN_HPP_NAMESPACE::Optional<const VULKAN_HPP_NAMESPACE::AllocationCallbacks> allocator ) const
VULKAN_HPP_RAII_CREATE_NOEXCEPT
{
VULKAN_HPP_ASSERT(
createInfo.flags & vk::DescriptorPoolCreateFlagBits::eFreeDescriptorSet &&
"createInfo.flags need to have vk::DescriptorPoolCreateFlagBits::eFreeDesriptors set in order to allow destruction of VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE::DescriptorSet which requires to return individual allocations to the pool" );
VULKAN_HPP_NAMESPACE::DescriptorPool descriptorPool;
VULKAN_HPP_NAMESPACE::Result result = static_cast<VULKAN_HPP_NAMESPACE::Result>( getDispatcher()->vkCreateDescriptorPool(
static_cast<VkDevice>( m_device ),
Expand Down

0 comments on commit ed47b1d

Please sign in to comment.