Skip to content

Commit 38b2d98

Browse files
Apparently Nabla, Examples Common PCH, and Example can't agree on the value of _NBL_DEBUG !?
1 parent 584bc1f commit 38b2d98

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

include/nbl/video/alloc/CAsyncSingleBufferSubAllocator.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ template<class AddressAllocator, class HostAllocator>
2121
class CAsyncSingleBufferSubAllocator
2222
{
2323
private:
24-
#ifdef _NBL_DEBUG
24+
#if 0 // ifdef _NBL_DEBUG
2525
std::recursive_mutex stAccessVerfier;
2626
#endif // _NBL_DEBUG
2727
using ThisType = CAsyncSingleBufferSubAllocator<AddressAllocator,HostAllocator>;
@@ -102,7 +102,7 @@ class CAsyncSingleBufferSubAllocator
102102
inline void operator()()
103103
{
104104
std::destroy_n(reinterpret_cast<ref_t*>(rangeData+numAllocs*2u),numAllocs);
105-
#ifdef _NBL_DEBUG
105+
#if 0 // ifdef _NBL_DEBUG
106106
assert(composed && rangeData);
107107
#endif // _NBL_DEBUG
108108
composed->multi_deallocate(numAllocs,rangeData,rangeData+numAllocs);
@@ -130,7 +130,7 @@ class CAsyncSingleBufferSubAllocator
130130
//! Returns free events still outstanding
131131
inline uint32_t cull_frees() noexcept
132132
{
133-
#ifdef _NBL_DEBUG
133+
#if 0 // ifdef _NBL_DEBUG
134134
std::unique_lock<std::recursive_mutex> tLock(stAccessVerfier,std::try_to_lock_t());
135135
assert(tLock.owns_lock());
136136
#endif // _NBL_DEBUG
@@ -140,7 +140,7 @@ class CAsyncSingleBufferSubAllocator
140140
//! Returns max possible currently allocatable single allocation size, without having to wait for GPU more
141141
inline size_type max_size() noexcept
142142
{
143-
#ifdef _NBL_DEBUG
143+
#if 0 // ifdef _NBL_DEBUG
144144
std::unique_lock<std::recursive_mutex> tLock(stAccessVerfier,std::try_to_lock_t());
145145
assert(tLock.owns_lock());
146146
#endif // _NBL_DEBUG
@@ -161,7 +161,7 @@ class CAsyncSingleBufferSubAllocator
161161
template<class Clock=typename std::chrono::steady_clock, typename... Args>
162162
inline size_type multi_allocate(const std::chrono::time_point<Clock>& maxWaitPoint, const Args&... args) noexcept
163163
{
164-
#ifdef _NBL_DEBUG
164+
#if 0 // ifdef _NBL_DEBUG
165165
std::unique_lock<std::recursive_mutex> tLock(stAccessVerfier,std::try_to_lock_t());
166166
assert(tLock.owns_lock());
167167
#endif // _NBL_DEBUG
@@ -187,15 +187,15 @@ class CAsyncSingleBufferSubAllocator
187187
//!
188188
inline void multi_deallocate(core::smart_refctd_ptr<IGPUFence>&& fence, DeferredFreeFunctor&& functor) noexcept
189189
{
190-
#ifdef _NBL_DEBUG
190+
#if 0 // ifdef _NBL_DEBUG
191191
std::unique_lock<std::recursive_mutex> tLock(stAccessVerfier,std::try_to_lock_t());
192192
assert(tLock.owns_lock());
193193
#endif // _NBL_DEBUG
194194
deferredFrees.addEvent(GPUEventWrapper(const_cast<ILogicalDevice*>(m_composed.getBuffer()->getOriginDevice()),std::move(fence)),std::move(functor));
195195
}
196196
inline void multi_deallocate(uint32_t count, const value_type* addr, const size_type* bytes) noexcept
197197
{
198-
#ifdef _NBL_DEBUG
198+
#if 0 // ifdef _NBL_DEBUG
199199
std::unique_lock<std::recursive_mutex> tLock(stAccessVerfier,std::try_to_lock_t());
200200
assert(tLock.owns_lock());
201201
#endif // _NBL_DEBUG

include/nbl/video/alloc/CSingleBufferSubAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class CSingleBufferSubAllocator : public IBufferAllocator
8888
protected:
8989
AddressAllocator m_addressAllocator;
9090
ReservedAllocator m_reservedAllocator;
91-
size_t m_reservedSize;
91+
size_t m_reservedSize; // FIXME: uninitialized variable
9292
core::smart_refctd_ptr<IGPUBuffer> m_buffer;
9393
};
9494

0 commit comments

Comments
 (0)