Skip to content

If using multiple sets in a shader, they may be ordered incorrectly when creating a descriptor [fixed] #86

@EvilTrev

Description

@EvilTrev

This is because they are coming from an unordered_map and the sets might get shuffled around, the following code in Pipeline.cpp inserts them into a vector in essentially random order:

        // Create the pipeline layout handle.
        std::vector<VkDescriptorSetLayout> setLayouts;
        for (auto it : pipeline->m_descriptorSetLayouts)
            setLayouts.push_back(it.second->GetHandle());

Change it as follows (in two spots) to solve this issue:

        // Create the pipeline layout handle.
        std::vector<VkDescriptorSetLayout> setLayouts( pipeline->m_descriptorSetLayouts.size() );
        for (auto it : pipeline->m_descriptorSetLayouts)
            setLayouts[ it.first ] = it.second->GetHandle();

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