mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Set counter-fetching mode around IHV counters on OpenGL
* This mode suppresses the default behaviour to end unbalanced things like transform feedback and queries, and also stops the capture from using queries that might be in use outside.
This commit is contained in:
@@ -566,6 +566,8 @@ rdcarray<CounterResult> GLReplay::FetchCounters(const rdcarray<GPUCounter> &allC
|
||||
std::copy_if(allCounters.begin(), allCounters.end(), std::back_inserter(counters),
|
||||
[](const GPUCounter &c) { return IsGenericCounter(c); });
|
||||
|
||||
m_pDriver->SetFetchCounters(true);
|
||||
|
||||
if(m_pAMDCounters)
|
||||
{
|
||||
// Filter out the AMD counters
|
||||
@@ -602,6 +604,8 @@ rdcarray<CounterResult> GLReplay::FetchCounters(const rdcarray<GPUCounter> &allC
|
||||
ret = FetchCountersARM(armCounters);
|
||||
}
|
||||
|
||||
m_pDriver->SetFetchCounters(false);
|
||||
|
||||
if(counters.empty())
|
||||
{
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user