Use actual size of Intel performance counters metadata.

Fixes exporting of performance counter values to CSV.
This commit is contained in:
Marcin Ślusarz
2020-07-09 22:12:49 +02:00
committed by Baldur Karlsson
parent c15078b900
commit 4c40549b32
@@ -93,6 +93,9 @@ void IntelGlCounters::addCounter(const IntelGlQuery &query, GLuint counterId)
(GLuint)counter.desc.description.size(), &counter.desc.description[0], &counter.offset,
&counter.desc.resultByteWidth, &counter.type, &counter.dataType, NULL);
counter.desc.name.resize(strlen(&counter.desc.name[0]));
counter.desc.description.resize(strlen(&counter.desc.description[0]));
if(m_CounterNames.find(counter.desc.name) != m_CounterNames.end())
return;
@@ -124,6 +127,7 @@ void IntelGlCounters::addQuery(GLuint queryId)
if(GL.glGetError() != eGL_NONE)
return;
query.name.resize(strlen(&query.name[0]));
if(metricSetBlacklist.contains(query.name))
return;