@@ -45,10 +45,32 @@ class IGPUDescriptorSet : public asset::IDescriptorSet<const IGPUDescriptorSetLa
45
45
uint32_t count;
46
46
};
47
47
48
+ struct SDropDescriptorSet
49
+ {
50
+ IGPUDescriptorSet* dstSet;
51
+ uint32_t binding;
52
+ uint32_t arrayElement;
53
+ uint32_t count;
54
+ };
55
+
48
56
inline uint64_t getVersion () const { return m_version.load (); }
49
57
inline IDescriptorPool* getPool () const { return m_pool.get (); }
50
58
inline bool isZombie () const { return (m_pool.get () == nullptr ); }
51
59
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
+
52
74
protected:
53
75
IGPUDescriptorSet (core::smart_refctd_ptr<const IGPUDescriptorSetLayout>&& _layout, core::smart_refctd_ptr<IDescriptorPool>&& pool, IDescriptorPool::SStorageOffsets&& offsets);
54
76
virtual ~IGPUDescriptorSet ();
@@ -61,6 +83,7 @@ class IGPUDescriptorSet : public asset::IDescriptorSet<const IGPUDescriptorSetLa
61
83
void processWrite (const IGPUDescriptorSet::SWriteDescriptorSet& write, const asset::IDescriptor::E_TYPE type);
62
84
bool validateCopy (const IGPUDescriptorSet::SCopyDescriptorSet& copy) const ;
63
85
void processCopy (const IGPUDescriptorSet::SCopyDescriptorSet& copy);
86
+ void dropDescriptors (const IGPUDescriptorSet::SDropDescriptorSet& drop);
64
87
65
88
using redirect_t = IGPUDescriptorSetLayout::CBindingRedirect;
66
89
// 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
76
99
77
100
return descriptors+localOffset;
78
101
}
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
- }
91
102
92
103
inline core::smart_refctd_ptr<IGPUSampler>* getMutableSamplers (const uint32_t binding) const
93
104
{
0 commit comments