mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Do not include Intel counters in the generic ones
At this point we don't have Intel GL counters. But the current logic assumes there is only AMD ones (and that if it's not AMD's, it must be the generic ones).
This commit is contained in:
committed by
Baldur Karlsson
parent
26f9fc5c61
commit
6d95122189
@@ -2875,6 +2875,17 @@ enum class GPUCounter : uint32_t
|
||||
ITERABLE_OPERATORS(GPUCounter);
|
||||
DECLARE_REFLECTION_ENUM(GPUCounter);
|
||||
|
||||
DOCUMENT(R"(Check whether or not this is a Generic counter.
|
||||
|
||||
:param GPUCounter c: The counter.
|
||||
:return: ``True`` if it is a generic counter, ``False`` if it's not.
|
||||
:rtype: ``bool``
|
||||
)");
|
||||
inline constexpr bool IsGenericCounter(GPUCounter c)
|
||||
{
|
||||
return c < GPUCounter::Count;
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Check whether or not this is an AMD private counter.
|
||||
|
||||
:param GPUCounter c: The counter.
|
||||
|
||||
@@ -576,9 +576,7 @@ vector<CounterResult> D3D11Replay::FetchCounters(const vector<GPUCounter> &count
|
||||
|
||||
vector<GPUCounter> d3dCounters;
|
||||
std::copy_if(counters.begin(), counters.end(), std::back_inserter(d3dCounters),
|
||||
[](const GPUCounter &c) {
|
||||
return !IsAMDCounter(c) && !IsNvidiaCounter(c) && !IsIntelCounter(c);
|
||||
});
|
||||
[](const GPUCounter &c) { return IsGenericCounter(c); });
|
||||
|
||||
if(m_pAMDCounters)
|
||||
{
|
||||
|
||||
@@ -382,7 +382,7 @@ vector<CounterResult> GLReplay::FetchCounters(const vector<GPUCounter> &allCount
|
||||
|
||||
vector<GPUCounter> counters;
|
||||
std::copy_if(allCounters.begin(), allCounters.end(), std::back_inserter(counters),
|
||||
[](const GPUCounter &c) { return !IsAMDCounter(c); });
|
||||
[](const GPUCounter &c) { return IsGenericCounter(c); });
|
||||
|
||||
if(m_pAMDCounters)
|
||||
{
|
||||
|
||||
@@ -451,7 +451,7 @@ vector<CounterResult> VulkanReplay::FetchCounters(const vector<GPUCounter> &coun
|
||||
|
||||
vector<GPUCounter> vkCounters;
|
||||
std::copy_if(counters.begin(), counters.end(), std::back_inserter(vkCounters),
|
||||
[](const GPUCounter &c) { return !IsAMDCounter(c); });
|
||||
[](const GPUCounter &c) { return IsGenericCounter(c); });
|
||||
|
||||
vector<CounterResult> ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user