@@ -102,12 +102,14 @@ class NBL_API2 IDescriptorPool : public IBackendObject
102
102
switch (type)
103
103
{
104
104
case asset::IDescriptor::E_TYPE::ET_SAMPLER:
105
- baseAddress = reinterpret_cast <core::smart_refctd_ptr<asset::IDescriptor>*>(m_mutableStandaloneSamplerStorage .get ());
105
+ baseAddress = reinterpret_cast <core::smart_refctd_ptr<asset::IDescriptor>*>(m_samplerStorage .get ());
106
106
break ;
107
107
case asset::IDescriptor::E_TYPE::ET_COMBINED_IMAGE_SAMPLER:
108
- case asset::IDescriptor::E_TYPE::ET_SAMPLED_IMAGE:
109
108
baseAddress = reinterpret_cast <core::smart_refctd_ptr<asset::IDescriptor>*>(m_textureStorage.get ());
110
109
break ;
110
+ case asset::IDescriptor::E_TYPE::ET_SAMPLED_IMAGE:
111
+ baseAddress = reinterpret_cast <core::smart_refctd_ptr<asset::IDescriptor>*>(m_textureStorage.get ()) + m_creationParameters.maxDescriptorCount [static_cast <uint32_t >(asset::IDescriptor::E_TYPE::ET_COMBINED_IMAGE_SAMPLER)];
112
+ break ;
111
113
case asset::IDescriptor::E_TYPE::ET_STORAGE_IMAGE:
112
114
baseAddress = reinterpret_cast <core::smart_refctd_ptr<asset::IDescriptor>*>(m_storageImageStorage.get ());
113
115
break ;
@@ -145,7 +147,7 @@ class NBL_API2 IDescriptorPool : public IBackendObject
145
147
146
148
inline core::smart_refctd_ptr<IGPUSampler>* getMutableCombinedSamplerStorage () const
147
149
{
148
- return reinterpret_cast <core::smart_refctd_ptr<IGPUSampler>*>(m_mutableCombinedSamplerStorage .get ());
150
+ return reinterpret_cast <core::smart_refctd_ptr<IGPUSampler>*>(m_samplerStorage .get ()) + m_creationParameters. maxDescriptorCount [ static_cast < uint32_t >(asset::IDescriptor::E_TYPE::ET_SAMPLER)] ;
149
151
}
150
152
151
153
friend class IGPUDescriptorSet ;
@@ -222,8 +224,7 @@ class NBL_API2 IDescriptorPool : public IBackendObject
222
224
std::unique_ptr<IGPUDescriptorSet* []> m_allocatedDescriptorSets = nullptr ; // This array might be sparse.
223
225
224
226
std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<video::IGPUImageView>>[]> m_textureStorage;
225
- std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<video::IGPUSampler>>[]> m_mutableCombinedSamplerStorage;
226
- std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<video::IGPUSampler>>[]> m_mutableStandaloneSamplerStorage;
227
+ std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<video::IGPUSampler>>[]> m_samplerStorage;
227
228
std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<IGPUImageView>>[]> m_storageImageStorage; // storage image | input attachment
228
229
std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<IGPUBuffer>>[]> m_UBO_SSBOStorage; // ubo | ssbo | ubo dynamic | ssbo dynamic
229
230
std::unique_ptr<core::StorageTrivializer<core::smart_refctd_ptr<IGPUBufferView>>[]> m_UTB_STBStorage; // utb | stb
0 commit comments