aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-01 17:11:49 -0700
committerChris Robinson <[email protected]>2023-05-01 17:11:49 -0700
commitbb08a416f1b0e31292b896f2f8845e365daee6b1 (patch)
tree065c1ec74167265451fd3396b7557be22f962c16 /alc/context.cpp
parent89f67ad6f9878ecfb48b49ce0dd69b9ecb065d0b (diff)
Put the debug filters into a group
Diffstat (limited to 'alc/context.cpp')
-rw-r--r--alc/context.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/alc/context.cpp b/alc/context.cpp
index 7d10a91d..755a1e41 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -122,6 +122,7 @@ void ALCcontext::setThreadContext(ALCcontext *context) noexcept
ALCcontext::ALCcontext(al::intrusive_ptr<ALCdevice> device)
: ContextBase{device.get()}, mALDevice{std::move(device)}
{
+ mDebugGroups.emplace_back(DebugSource::Other, 0, std::string{});
}
ALCcontext::~ALCcontext()
@@ -328,6 +329,7 @@ void ALCcontext::sendDebugMessage(DebugSource source, DebugType type, ALuint id,
}
std::unique_lock<std::mutex> debuglock{mDebugCbLock};
+ DebugGroup &debug = mDebugGroups.back();
if(!mDebugEnabled.load()) UNLIKELY
return;
@@ -372,15 +374,15 @@ void ALCcontext::sendDebugMessage(DebugSource source, DebugType type, ALuint id,
const uint64_t idfilter{(1_u64 << (DebugSourceBase+al::to_underlying(source)))
| (1_u64 << (DebugTypeBase+al::to_underlying(type)))
| (uint64_t{id} << 32)};
- auto iditer = std::lower_bound(mDebugIdFilters.cbegin(), mDebugIdFilters.cend(), idfilter);
- if(iditer != mDebugIdFilters.cend() && *iditer == idfilter)
+ auto iditer = std::lower_bound(debug.mIdFilters.cbegin(), debug.mIdFilters.cend(), idfilter);
+ if(iditer != debug.mIdFilters.cend() && *iditer == idfilter)
return;
const uint filter{(1u << (DebugSourceBase+al::to_underlying(source)))
| (1u << (DebugTypeBase+al::to_underlying(type)))
| (1u << (DebugSeverityBase+al::to_underlying(severity)))};
- auto iter = std::lower_bound(mDebugFilters.cbegin(), mDebugFilters.cend(), filter);
- if(iter != mDebugFilters.cend() && *iter == filter)
+ auto iter = std::lower_bound(debug.mFilters.cbegin(), debug.mFilters.cend(), filter);
+ if(iter != debug.mFilters.cend() && *iter == filter)
return;
if(mDebugCb)