Skip to content

Commit e55f65e

Browse files
committed
Make SBinding::stageFlags a core::bitflag.
1 parent db07a86 commit e55f65e

File tree

2 files changed

+4
-30
lines changed

2 files changed

+4
-30
lines changed

include/nbl/asset/IDescriptorSetLayout.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class NBL_API IDescriptorSetLayout : public virtual core::IReferenceCounted
141141
uint32_t binding;
142142
E_DESCRIPTOR_TYPE type;
143143
core::bitflag<E_CREATE_FLAGS> createFlags;
144-
IShader::E_SHADER_STAGE stageFlags; // TODO(achal): Should make a core::bitflag out of this as well?
144+
core::bitflag<IShader::E_SHADER_STAGE> stageFlags;
145145
uint32_t count;
146146
// Use this if you want an immutable sampler that is baked into the DS layout itself.
147147
// If its `nullptr` then the sampler used is mutable and can be specified while writing the image descriptor to a binding while updating the DS.
@@ -156,7 +156,7 @@ class NBL_API IDescriptorSetLayout : public virtual core::IReferenceCounted
156156
{
157157
if (count==rhs.count)
158158
{
159-
if (stageFlags==rhs.stageFlags)
159+
if (stageFlags.value==rhs.stageFlags.value)
160160
{
161161
if (createFlags.value == rhs.createFlags.value)
162162
{
@@ -170,7 +170,7 @@ class NBL_API IDescriptorSetLayout : public virtual core::IReferenceCounted
170170
}
171171
return createFlags.value < rhs.createFlags.value;
172172
}
173-
return stageFlags<rhs.stageFlags;
173+
return stageFlags.value<rhs.stageFlags.value;
174174
}
175175
return count<rhs.count;
176176
}
@@ -186,7 +186,7 @@ class NBL_API IDescriptorSetLayout : public virtual core::IReferenceCounted
186186
return false;
187187
if (count != rhs.count)
188188
return false;
189-
if (stageFlags != rhs.stageFlags)
189+
if (stageFlags.value != rhs.stageFlags.value)
190190
return false;
191191
if (createFlags.value != rhs.createFlags.value)
192192
return false;

include/nbl/video/IGPUCommandPool.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -255,32 +255,6 @@ class NBL_API IGPUCommandPool : public core::IReferenceCounted, public IBackendO
255255
CCommandSegment* tail = nullptr;
256256
};
257257

258-
struct Iterator
259-
{
260-
ICommand* cmd = nullptr;
261-
CCommandSegment* segment = nullptr;
262-
263-
inline bool operator!=(const Iterator& other) const { return cmd != other.cmd; }
264-
265-
inline Iterator operator++(int)
266-
{
267-
Iterator old = *this;
268-
if (cmd)
269-
{
270-
assert(segment);
271-
272-
// If `cmd` was "one past the end" then the size was wiped to 0 and it won't move.
273-
cmd = reinterpret_cast<ICommand*>(reinterpret_cast<uint8_t*>(cmd) + cmd->getSize());
274-
275-
if (cmd == segment->segment_end())
276-
*this = segment->end();
277-
}
278-
return old;
279-
}
280-
281-
inline ICommand* operator*() { return cmd; }
282-
};
283-
284258
CCommandSegmentListPool() : m_pool(COMMAND_SEGMENTS_PER_BLOCK*COMMAND_SEGMENT_SIZE, 0u, MAX_COMMAND_SEGMENT_BLOCK_COUNT, MIN_POOL_ALLOC_SIZE) {}
285259

286260
template <typename Cmd, typename... Args>

0 commit comments

Comments
 (0)