diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/context.cpp | 11 | ||||
-rw-r--r-- | alc/context.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index 66de19d6..d4019bc9 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -366,6 +366,17 @@ void ALCcontext::sendDebugMessage(DebugSource source, DebugType type, ALuint id, throw std::runtime_error{"Unexpected debug severity value "+std::to_string(al::to_underlying(severity))}; }; + auto iditer = mDebugIdFilters.find(id); + if(iditer != mDebugIdFilters.end()) + { + const uint filter{(1u<<(DebugSourceBase+al::to_underlying(source))) + | (1u<<(DebugTypeBase+al::to_underlying(type)))}; + + auto iter = std::lower_bound(iditer->second.cbegin(), iditer->second.cend(), filter); + if(iter != iditer->second.cend() && *iter == filter) + return; + } + const uint filter{(1u<<(DebugSourceBase+al::to_underlying(source))) | (1u<<(DebugTypeBase+al::to_underlying(type))) | (1u<<(DebugSeverityBase+al::to_underlying(severity)))}; diff --git a/alc/context.h b/alc/context.h index 031e061e..c626160b 100644 --- a/alc/context.h +++ b/alc/context.h @@ -6,6 +6,7 @@ #include <memory> #include <mutex> #include <stdint.h> +#include <unordered_map> #include <utility> #include "AL/al.h" @@ -145,6 +146,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase { ALDEBUGPROCSOFT mDebugCb{}; void *mDebugParam{nullptr}; std::vector<uint> mDebugFilters; + std::unordered_map<uint,std::vector<uint>> mDebugIdFilters; std::deque<LogEntry> mDebugLog; ALlistener mListener{}; |