Skip to content

DescriptorPool leaks when exceeding m_maxSetsPerPool #72

@vlmillet

Description

@vlmillet

DescriptorPool leaks descriptor sets when the number of descriptor sets exceeds the m_maxSetsPerPool value. The reason is simple : in FreeDescriptorSets we override m_currentAllocationPoolIndex by the freed descriptor set pool index, but we don't test if m_currentAllocationPoolIndex was already inferior to it which leads in loosing information of previously freed descriptor sets.
There are two ways to fix this, but I think both must be used, just in case :
The first is to use canonical destruction of descriptor sets by reversing order of destruction of transient resources in StreamEncoder.
The second and safest is to add the above described test in DescriptorPool::FreeDescriptorSet :

if (poolIndex < m_currentAllocationPoolIndex)
    m_currentAllocationPoolIndex = poolIndex;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions