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:
Lionel Landwerlin
2018-10-21 19:42:43 +01:00
committed by Baldur Karlsson
parent 26f9fc5c61
commit 6d95122189
4 changed files with 14 additions and 5 deletions
+11
View File
@@ -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.
+1 -3
View File
@@ -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)
{
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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;