@@ -45,10 +45,32 @@ class IGPUDescriptorSet : public asset::IDescriptorSet<const IGPUDescriptorSetLa
4545 uint32_t count;
4646 };
4747
48+ struct SDropDescriptorSet
49+ {
50+ IGPUDescriptorSet* dstSet;
51+ uint32_t binding;
52+ uint32_t arrayElement;
53+ uint32_t count;
54+ };
55+
4856 inline uint64_t getVersion () const { return m_version.load (); }
4957 inline IDescriptorPool* getPool () const { return m_pool.get (); }
5058 inline bool isZombie () const { return (m_pool.get () == nullptr ); }
5159
60+ // why is this private? nothing it uses is private
61+ // small utility
62+ inline asset::IDescriptor::E_TYPE getBindingType (const uint32_t binding) const
63+ {
64+ for (auto t=0u ; t<static_cast <uint32_t >(asset::IDescriptor::E_TYPE::ET_COUNT); t++)
65+ {
66+ const auto type = static_cast <asset::IDescriptor::E_TYPE>(t);
67+ const auto & bindingRedirect = getLayout ()->getDescriptorRedirect (type);
68+ if (bindingRedirect.getStorageOffset (redirect_t ::binding_number_t {binding}).data !=redirect_t ::Invalid)
69+ return type;
70+ }
71+ return asset::IDescriptor::E_TYPE::ET_COUNT;
72+ }
73+
5274 protected:
5375 IGPUDescriptorSet (core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout, core::smart_refctd_ptr<IDescriptorPool>&& pool, IDescriptorPool::SStorageOffsets&& offsets);
5476 virtual ~IGPUDescriptorSet ();
@@ -61,6 +83,7 @@ class IGPUDescriptorSet : public asset::IDescriptorSet<const IGPUDescriptorSetLa
6183 void processWrite (const IGPUDescriptorSet::SWriteDescriptorSet& write, const asset::IDescriptor::E_TYPE type);
6284 bool validateCopy (const IGPUDescriptorSet::SCopyDescriptorSet& copy) const ;
6385 void processCopy (const IGPUDescriptorSet::SCopyDescriptorSet& copy);
86+ void dropDescriptors (const IGPUDescriptorSet::SDropDescriptorSet& drop);
6487
6588 using redirect_t = IGPUDescriptorSetLayout::CBindingRedirect;
6689 // This assumes that descriptors of a particular type in the set will always be contiguous in pool's storage memory, regardless of which binding in the set they belong to.
@@ -76,18 +99,6 @@ class IGPUDescriptorSet : public asset::IDescriptorSet<const IGPUDescriptorSetLa
7699
77100 return descriptors+localOffset;
78101 }
79- // small utility
80- inline asset::IDescriptor::E_TYPE getBindingType (const uint32_t binding) const
81- {
82- for (auto t=0u ; t<static_cast <uint32_t >(asset::IDescriptor::E_TYPE::ET_COUNT); t++)
83- {
84- const auto type = static_cast <asset::IDescriptor::E_TYPE>(t);
85- const auto & bindingRedirect = getLayout ()->getDescriptorRedirect (type);
86- if (bindingRedirect.getStorageOffset (redirect_t ::binding_number_t {binding}).data !=redirect_t ::Invalid)
87- return type;
88- }
89- return asset::IDescriptor::E_TYPE::ET_COUNT;
90- }
91102
92103 inline core::smart_refctd_ptr<IGPUSampler>* getMutableSamplers (const uint32_t binding) const
93104 {
0 commit comments