Explorar o código

Android fixes

Panagiotis Christopoulos Charitos %!s(int64=2) %!d(string=hai) anos
pai
achega
dd41629717

+ 2 - 2
AnKi/Core/App.cpp

@@ -531,8 +531,8 @@ Error App::mainLoop()
 					MaliHwCountersOut out;
 					MaliHwCounters::getSingleton().sample(out);
 					g_maliGpuActive.set(out.m_gpuActive);
-					g_maliReadBandwidth.set(out.m_readBandwidth);
-					g_maliWriteBandwidth.set(out.m_writeBandwidth);
+					g_maliGpuReadBandwidth.set(out.m_readBandwidth);
+					g_maliGpuWriteBandwidth.set(out.m_writeBandwidth);
 				}
 #endif
 

+ 0 - 2
AnKi/Gr/Vulkan/DescriptorSet.cpp

@@ -1038,7 +1038,6 @@ Error DescriptorSetFactory::newDescriptorSetLayout(const DescriptorSetLayoutInit
 		LockGuard<SpinLock> lock(m_cachesMtx);
 
 		DSLayoutCacheEntry* cache = nullptr;
-		U count = 0;
 		for(DSLayoutCacheEntry* it : m_caches)
 		{
 			if(it->m_hash == hash)
@@ -1046,7 +1045,6 @@ Error DescriptorSetFactory::newDescriptorSetLayout(const DescriptorSetLayoutInit
 				cache = it;
 				break;
 			}
-			++count;
 		}
 
 		if(cache == nullptr)

+ 2 - 1
AnKi/Scene/Components/SceneComponent.h

@@ -228,7 +228,7 @@ protected:
 	/// @note Not thread-safe.
 	void refreshUuid()
 	{
-		refreshUuidCustom(SceneGraph::getSingleton().getNewUuid());
+		refreshUuidCustom(m_nextUuid.fetchAdd(1));
 	}
 
 	/// @note Not thread-safe.
@@ -275,6 +275,7 @@ private:
 
 	inline static SceneHashMap<U32, T*> m_uuidToSceneComponent;
 	inline static SpinLock m_uuidToSceneComponentLock;
+	inline static Atomic<U32> m_nextUuid = {1};
 };
 /// @}
 

+ 1 - 1
AnKi/Util/SparseArray.inl.h

@@ -271,7 +271,7 @@ void SparseArray<T, TMemoryPool, TConfig>::validate() const
 	}
 
 	// Start iterating
-	U elementCount = 0;
+	[[maybe_unused]] U elementCount = 0;
 	Index count = m_capacity;
 	Index pos = startPos;
 	Index prevPos = ~Index(0);

+ 1 - 1
CMakeLists.txt

@@ -137,7 +137,7 @@ else()
 	set(_ANKI_TRACING_ENABLED 0)
 endif()
 
-option(ANKI_STATS "Enable performance statistics. Small overhead" OFF)
+option(ANKI_STATS "Enable performance statistics. Small overhead" ON)
 if(ANKI_STATS)
 	set(_ANKI_STATS_ENABLED 1)
 else()

+ 1 - 1
ThirdParty/SpirvCross/spirv_common.hpp

@@ -650,7 +650,7 @@ struct SPIRExpression : IVariant
 
 	// Only created by the backend target to avoid creating tons of temporaries.
 	SPIRExpression(std::string expr, TypeID expression_type_, bool immutable_)
-	    : expression(move(expr))
+	    : expression(expr)
 	    , expression_type(expression_type_)
 	    , immutable(immutable_)
 	{