diff --git a/src/dxvk/dxvk_descriptor.cpp b/src/dxvk/dxvk_descriptor.cpp index ae155c26..13cc93a6 100644 --- a/src/dxvk/dxvk_descriptor.cpp +++ b/src/dxvk/dxvk_descriptor.cpp @@ -161,14 +161,13 @@ namespace dxvk { DxvkDescriptorSetMap* DxvkDescriptorPool::getSetMap( const DxvkBindingLayoutObjects* layout) { - auto pair = m_setMaps.find(layout->getPipelineLayout(false)); - if (likely(pair != m_setMaps.end())) { + auto pair = m_setMaps.find(layout); + if (likely(pair != m_setMaps.end())) return &pair->second; - } auto iter = m_setMaps.emplace( std::piecewise_construct, - std::tuple(layout->getPipelineLayout(false)), + std::tuple(layout), std::tuple()); for (uint32_t i = 0; i < DxvkDescriptorSets::SetCount; i++) { diff --git a/src/dxvk/dxvk_descriptor.h b/src/dxvk/dxvk_descriptor.h index 7c874f65..876aae04 100644 --- a/src/dxvk/dxvk_descriptor.h +++ b/src/dxvk/dxvk_descriptor.h @@ -136,10 +136,19 @@ namespace dxvk { DxvkDescriptorManager* m_manager; DxvkContextType m_contextType; - std::vector m_descriptorPools; - std::unordered_map m_setLists; - std::unordered_map m_setMaps; - std::pair m_cachedEntry; + std::vector m_descriptorPools; + + std::unordered_map< + VkDescriptorSetLayout, + DxvkDescriptorSetList> m_setLists; + + std::unordered_map< + const DxvkBindingLayoutObjects*, + DxvkDescriptorSetMap> m_setMaps; + + std::pair< + const DxvkBindingLayoutObjects*, + DxvkDescriptorSetMap*> m_cachedEntry; uint32_t m_setsAllocated = 0; uint32_t m_setsUsed = 0;