@@ -54,10 +54,12 @@ Error GpuVisibility::init()
m_grProgs[i].reset(&variant->getProgram());
}
+#if ANKI_STATS_ENABLED
for(GpuReadbackMemoryAllocation& alloc : m_readbackMemory)
{
alloc = GpuReadbackMemoryPool::getSingleton().allocate(sizeof(U32));
+#endif
return Error::kNone;
@@ -184,7 +184,11 @@
// Now update the stats
#if STATS
- InterlockedAdd(g_testsPassed[0], 1);
+ const U32 activeLanes = WaveActiveCountBits(true);
+ if(WaveIsFirstLane())
+ {
+ InterlockedAdd(g_testsPassed[0], activeLanes);
+ }
#endif
@@ -164,3 +164,5 @@ template<typename T>
T WaveActiveMax(T value);
bool WaveIsFirstLane();
+
+unsigned WaveActiveCountBits(bool bit);