Browse Source

Remove the ANKI_XXLIKELY macros in favour of c++20 likelihood attributes

Panagiotis Christopoulos Charitos 2 years ago
parent
commit
48dd5357f1
48 changed files with 218 additions and 216 deletions
  1. 1 1
      AnKi/Collision/FunctionsTestPlane.cpp
  2. 0 4
      AnKi/Config.h.cmake
  3. 6 7
      AnKi/Core/App.cpp
  4. 1 1
      AnKi/Core/GpuMemoryPools.cpp
  5. 1 1
      AnKi/Gr/Gl/CommandBufferImpl.cpp
  6. 3 3
      AnKi/Gr/RenderGraph.cpp
  7. 2 2
      AnKi/Gr/Vulkan/CommandBufferFactory.cpp
  8. 2 2
      AnKi/Gr/Vulkan/CommandBufferImpl.cpp
  9. 1 1
      AnKi/Gr/Vulkan/CommandBufferImpl.h
  10. 4 4
      AnKi/Gr/Vulkan/CommandBufferImpl.inl.h
  11. 2 2
      AnKi/Gr/Vulkan/Common.h
  12. 4 4
      AnKi/Gr/Vulkan/DescriptorSet.cpp
  13. 1 1
      AnKi/Gr/Vulkan/FenceFactory.h
  14. 1 1
      AnKi/Gr/Vulkan/FrameGarbageCollector.cpp
  15. 1 1
      AnKi/Gr/Vulkan/GpuMemoryManager.cpp
  16. 2 2
      AnKi/Gr/Vulkan/GrManager.cpp
  17. 1 1
      AnKi/Gr/Vulkan/GrManagerImpl.cpp
  18. 1 1
      AnKi/Gr/Vulkan/MicroObjectRecycler.inl.h
  19. 1 1
      AnKi/Gr/Vulkan/Pipeline.cpp
  20. 2 2
      AnKi/Physics/PhysicsWorld.cpp
  21. 9 9
      AnKi/Renderer/ClusterBinning.cpp
  22. 3 3
      AnKi/Renderer/Common.h
  23. 1 1
      AnKi/Renderer/DepthDownscale.cpp
  24. 1 1
      AnKi/Renderer/GBuffer.cpp
  25. 1 1
      AnKi/Renderer/IndirectDiffuse.cpp
  26. 3 3
      AnKi/Renderer/IndirectDiffuseProbes.cpp
  27. 1 1
      AnKi/Renderer/IndirectSpecular.cpp
  28. 1 1
      AnKi/Renderer/MotionVectors.cpp
  29. 3 3
      AnKi/Renderer/ProbeReflections.cpp
  30. 1 1
      AnKi/Renderer/Renderer.cpp
  31. 1 1
      AnKi/Renderer/RtShadows.cpp
  32. 1 1
      AnKi/Renderer/ShadowMapping.cpp
  33. 1 1
      AnKi/Renderer/TemporalAA.cpp
  34. 1 1
      AnKi/Resource/AnimationResource.cpp
  35. 1 1
      AnKi/Resource/MaterialResource.cpp
  36. 1 1
      AnKi/Scene/VisibilityInternal.h
  37. 6 6
      AnKi/Script/Logger.cpp
  38. 117 117
      AnKi/Script/Math.cpp
  39. 6 6
      AnKi/Script/Renderer.cpp
  40. 2 2
      AnKi/Util/Allocator.h
  41. 1 1
      AnKi/Util/File.cpp
  42. 4 4
      AnKi/Util/MemoryPool.cpp
  43. 1 1
      AnKi/Util/Ptr.h
  44. 2 2
      AnKi/Util/SegregatedListsAllocatorBuilder.inl.h
  45. 1 1
      AnKi/Util/SparseArray.inl.h
  46. 8 1
      AnKi/Util/StdTypes.h
  47. 2 2
      AnKi/Util/ThreadPosix.cpp
  48. 1 1
      AnKi/Util/Tracer.cpp

+ 1 - 1
AnKi/Collision/FunctionsTestPlane.cpp

@@ -126,7 +126,7 @@ F32 testPlane(const Plane& plane, const ConvexHullShape& hull)
 	for(const Vec4& point : points)
 	{
 		const F32 test = testPlane(pa, point);
-		if(ANKI_UNLIKELY(test == 0.0f))
+		if(test == 0.0f) [[unlikely]]
 		{
 			// Early exit
 			return 0.0f;

+ 0 - 4
AnKi/Config.h.cmake

@@ -165,8 +165,6 @@
 
 // Some compiler attributes
 #if ANKI_COMPILER_GCC_COMPATIBLE
-#	define ANKI_LIKELY(x) __builtin_expect(!!(x), 1)
-#	define ANKI_UNLIKELY(x) __builtin_expect(!!(x), 0)
 #	define ANKI_RESTRICT __restrict
 #	define ANKI_FORCE_INLINE __attribute__((always_inline))
 #	define ANKI_DONT_INLINE __attribute__((noinline))
@@ -178,8 +176,6 @@
 #	define ANKI_CHECK_FORMAT(fmtArgIdx, firstArgIdx) __attribute__((format(printf, fmtArgIdx + 1, firstArgIdx + 1))) // On methods you need to include "this"
 #	define ANKI_PURE __attribute__((pure))
 #else
-#	define ANKI_LIKELY(x) (x)
-#	define ANKI_UNLIKELY(x) (x)
 #	define ANKI_RESTRICT
 #	define ANKI_FORCE_INLINE
 #	define ANKI_DONT_INLINE

+ 6 - 7
AnKi/Core/App.cpp

@@ -493,8 +493,7 @@ Error App::mainLoop()
 			const Second startTime = HighRezTimer::getCurrentTime();
 
 			prevUpdateTime = crntTime;
-			crntTime =
-				ANKI_LIKELY(!benchmarkMode) ? HighRezTimer::getCurrentTime() : (prevUpdateTime + 1.0_sec / 60.0_sec);
+			crntTime = (!benchmarkMode) ? HighRezTimer::getCurrentTime() : (prevUpdateTime + 1.0_sec / 60.0_sec);
 
 			// Update
 			ANKI_CHECK(m_input->handleEvents());
@@ -526,14 +525,14 @@ Error App::mainLoop()
 			// If we get stats exclude the time of GR because it forces some GPU-CPU serialization. We don't want to
 			// count that
 			Second grTime = 0.0;
-			if(ANKI_UNLIKELY(benchmarkMode || m_config->getCoreDisplayStats() > 0))
+			if(benchmarkMode || m_config->getCoreDisplayStats() > 0) [[unlikely]]
 			{
 				grTime = HighRezTimer::getCurrentTime();
 			}
 
 			m_gr->swapBuffers();
 
-			if(ANKI_UNLIKELY(benchmarkMode || m_config->getCoreDisplayStats() > 0))
+			if(benchmarkMode || m_config->getCoreDisplayStats() > 0) [[unlikely]]
 			{
 				grTime = HighRezTimer::getCurrentTime() - grTime;
 			}
@@ -553,7 +552,7 @@ Error App::mainLoop()
 			// Sleep
 			const Second endTime = HighRezTimer::getCurrentTime();
 			const Second frameTime = endTime - startTime;
-			if(ANKI_LIKELY(!benchmarkMode))
+			if(!benchmarkMode) [[likely]]
 			{
 				const Second timerTick = 1.0_sec / Second(m_config->getCoreTargetFps());
 				if(frameTime < timerTick)
@@ -633,7 +632,7 @@ Error App::mainLoop()
 
 			++m_globalTimestamp;
 
-			if(ANKI_UNLIKELY(benchmarkMode))
+			if(benchmarkMode) [[unlikely]]
 			{
 				if(m_globalTimestamp >= m_config->getCoreBenchmarkModeFrameCount())
 				{
@@ -648,7 +647,7 @@ Error App::mainLoop()
 #endif
 	}
 
-	if(ANKI_UNLIKELY(benchmarkMode))
+	if(benchmarkMode) [[unlikely]]
 	{
 		ANKI_CORE_LOGI("Benchmark file saved in: %s", benchmarkCsvFileFilename.cstr());
 	}

+ 1 - 1
AnKi/Core/GpuMemoryPools.cpp

@@ -82,7 +82,7 @@ Error RebarStagingGpuMemoryPool::init(GrManager* gr, const ConfigSet& cfg)
 void* RebarStagingGpuMemoryPool::allocateFrame(PtrSize size, RebarGpuMemoryToken& token)
 {
 	void* address = tryAllocateFrame(size, token);
-	if(ANKI_UNLIKELY(address == nullptr))
+	if(address == nullptr) [[unlikely]]
 	{
 		ANKI_CORE_LOGF("Out of ReBAR GPU memory");
 	}

+ 1 - 1
AnKi/Gr/Gl/CommandBufferImpl.cpp

@@ -96,7 +96,7 @@ void CommandBufferImpl::flushDrawcall(CommandBuffer& cmdb)
 	//
 	// Set default state
 	//
-	if(ANKI_UNLIKELY(m_state.m_mayContainUnsetState))
+	if(m_state.m_mayContainUnsetState) [[unlikely]]
 	{
 		m_state.m_mayContainUnsetState = false;
 

+ 3 - 3
AnKi/Gr/RenderGraph.cpp

@@ -378,7 +378,7 @@ TexturePtr RenderGraph::getOrCreateRenderTarget(const TextureInitInfo& initInf,
 	// Find a cache entry
 	RenderTargetCacheEntry* entry = nullptr;
 	auto it = m_renderTargetCache.find(hash);
-	if(ANKI_UNLIKELY(it == m_renderTargetCache.getEnd()))
+	if(it == m_renderTargetCache.getEnd()) [[unlikely]]
 	{
 		// Didn't found the entry, create a new one
 
@@ -887,7 +887,7 @@ void RenderGraph::initBatches()
 			batch.m_cmdb = cmdb.get();
 
 			// Maybe write a timestamp
-			if(ANKI_UNLIKELY(setTimestamp))
+			if(setTimestamp) [[unlikely]]
 			{
 				setTimestamp = false;
 				TimestampQueryPtr query = getManager().newTimestampQuery();
@@ -1379,7 +1379,7 @@ void RenderGraph::flush()
 
 	for(U32 i = 0; i < m_ctx->m_graphicsCmdbs.getSize(); ++i)
 	{
-		if(ANKI_UNLIKELY(m_ctx->m_gatherStatistics && i == m_ctx->m_graphicsCmdbs.getSize() - 1))
+		if(m_ctx->m_gatherStatistics && i == m_ctx->m_graphicsCmdbs.getSize() - 1) [[unlikely]]
 		{
 			// Write a timestamp before the last flush
 

+ 2 - 2
AnKi/Gr/Vulkan/CommandBufferFactory.cpp

@@ -120,7 +120,7 @@ Error CommandBufferThreadAllocator::newCommandBuffer(CommandBufferFlag cmdbFlags
 
 	MicroCommandBuffer* out = recycler.findToReuse();
 
-	if(ANKI_UNLIKELY(out == nullptr))
+	if(out == nullptr) [[unlikely]]
 	{
 		// Create a new one
 
@@ -235,7 +235,7 @@ Error CommandBufferFactory::newCommandBuffer(ThreadId tid, CommandBufferFlag cmd
 			alloc = (it != m_threadAllocs.getEnd()) ? (*it) : nullptr;
 		}
 
-		if(ANKI_UNLIKELY(alloc == nullptr))
+		if(alloc == nullptr) [[unlikely]]
 		{
 			WLockGuard<RWMutex> lock(m_threadAllocMtx);
 

+ 2 - 2
AnKi/Gr/Vulkan/CommandBufferImpl.cpp

@@ -649,13 +649,13 @@ void CommandBufferImpl::setPipelineBarrierInternal(
 					&& "GENERATE_MIPMAPS should be alone");
 		ANKI_ASSERT(impl.isSubresourceValid(subresource));
 
-		if(ANKI_UNLIKELY(subresource.m_firstMipmap > 0 && nextUsage == TextureUsageBit::kGenerateMipmaps))
+		if(subresource.m_firstMipmap > 0 && nextUsage == TextureUsageBit::kGenerateMipmaps) [[unlikely]]
 		{
 			// This transition happens inside CommandBufferImpl::generateMipmapsX. No need to do something
 			continue;
 		}
 
-		if(ANKI_UNLIKELY(nextUsage == TextureUsageBit::kGenerateMipmaps))
+		if(nextUsage == TextureUsageBit::kGenerateMipmaps) [[unlikely]]
 		{
 			// The transition of the non zero mip levels happens inside CommandBufferImpl::generateMipmapsX so limit the
 			// subresource

+ 1 - 1
AnKi/Gr/Vulkan/CommandBufferImpl.h

@@ -441,7 +441,7 @@ private:
 #endif
 		m_empty = false;
 
-		if(ANKI_UNLIKELY(!m_beganRecording))
+		if(!m_beganRecording) [[unlikely]]
 		{
 			beginRecording();
 			m_beganRecording = true;

+ 4 - 4
AnKi/Gr/Vulkan/CommandBufferImpl.inl.h

@@ -389,7 +389,7 @@ inline void CommandBufferImpl::pushSecondLevelCommandBuffersInternal(ConstWeakAr
 
 	m_subpassContents = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS;
 
-	if(ANKI_UNLIKELY(m_rpCommandCount == 0))
+	if(m_rpCommandCount == 0) [[unlikely]]
 	{
 		beginRenderPassInternal();
 	}
@@ -419,7 +419,7 @@ inline void CommandBufferImpl::drawcallCommon()
 
 	m_subpassContents = VK_SUBPASS_CONTENTS_INLINE;
 
-	if(ANKI_UNLIKELY(m_rpCommandCount == 0) && !secondLevel())
+	if(m_rpCommandCount == 0 && !secondLevel())
 	{
 		beginRenderPassInternal();
 	}
@@ -470,7 +470,7 @@ inline void CommandBufferImpl::drawcallCommon()
 	}
 
 	// Flush viewport
-	if(ANKI_UNLIKELY(m_viewportDirty))
+	if(m_viewportDirty) [[unlikely]]
 	{
 		const Bool flipvp = flipViewport();
 
@@ -490,7 +490,7 @@ inline void CommandBufferImpl::drawcallCommon()
 	}
 
 	// Flush scissor
-	if(ANKI_UNLIKELY(m_scissorDirty))
+	if(m_scissorDirty) [[unlikely]]
 	{
 		const Bool flipvp = flipViewport();
 

+ 2 - 2
AnKi/Gr/Vulkan/Common.h

@@ -136,7 +136,7 @@ static_assert(!(BufferUsageBit::kAll & PrivateBufferUsageBit::kAllPrivate), "Upd
 	do \
 	{ \
 		VkResult rez; \
-		if(ANKI_UNLIKELY((rez = (x)) < 0)) \
+		if((rez = (x)) < 0) [[unlikely]] \
 		{ \
 			ANKI_VK_LOGF("Vulkan function failed (VkResult: %s): %s", vkResultToString(rez), #x); \
 		} \
@@ -147,7 +147,7 @@ static_assert(!(BufferUsageBit::kAll & PrivateBufferUsageBit::kAllPrivate), "Upd
 	do \
 	{ \
 		VkResult rez; \
-		if(ANKI_UNLIKELY((rez = (x)) < 0)) \
+		if((rez = (x)) < 0) [[unlikely]] \
 		{ \
 			ANKI_VK_LOGE("Vulkan function failed (VkResult: %s): %s", vkResultToString(rez), #x); \
 			return Error::kFunctionFailed; \

+ 4 - 4
AnKi/Gr/Vulkan/DescriptorSet.cpp

@@ -751,7 +751,7 @@ Error DSLayoutCacheEntry::getOrCreateDSAllocator(DescriptorSetFactory::DSAllocat
 
 	// Get or create thread-local
 	DescriptorSetFactory::ThreadLocal* threadLocal = DescriptorSetFactory::m_threadLocal;
-	if(ANKI_UNLIKELY(threadLocal == nullptr))
+	if(threadLocal == nullptr) [[unlikely]]
 	{
 		threadLocal = newInstance<DescriptorSetFactory::ThreadLocal>(*m_factory->m_pool);
 		DescriptorSetFactory::m_threadLocal = threadLocal;
@@ -761,14 +761,14 @@ Error DSLayoutCacheEntry::getOrCreateDSAllocator(DescriptorSetFactory::DSAllocat
 	}
 
 	// Get or create the allocator
-	if(ANKI_UNLIKELY(m_index >= threadLocal->m_allocators.getSize()))
+	if(m_index >= threadLocal->m_allocators.getSize()) [[unlikely]]
 	{
 		threadLocal->m_allocators.resize(*m_factory->m_pool, m_index + 1, nullptr);
 		alloc = newInstance<DescriptorSetFactory::DSAllocator>(*m_factory->m_pool, this);
 		ANKI_CHECK(alloc->init());
 		threadLocal->m_allocators[m_index] = alloc;
 	}
-	else if(ANKI_UNLIKELY(threadLocal->m_allocators[m_index] == nullptr))
+	else if(threadLocal->m_allocators[m_index] == nullptr) [[unlikely]]
 	{
 		alloc = newInstance<DescriptorSetFactory::DSAllocator>(*m_factory->m_pool, this);
 		ANKI_CHECK(alloc->init());
@@ -793,7 +793,7 @@ AnyBinding& DescriptorSetState::getBindingToPopulate(U32 bindingIdx, U32 arrayId
 	m_bindingSet.set(bindingIdx);
 	extended.m_arraySize = (!bindingIsSet) ? 0 : extended.m_arraySize;
 
-	if(ANKI_LIKELY(arrayIdx == 0 && extended.m_arraySize <= 1))
+	if(arrayIdx == 0 && extended.m_arraySize <= 1) [[likely]]
 	{
 		// Array idx is zero, most common case
 		out = &extended.m_single;

+ 1 - 1
AnKi/Gr/Vulkan/FenceFactory.h

@@ -51,7 +51,7 @@ public:
 	void wait()
 	{
 		const Bool timeout = !clientWait(kMaxSecond);
-		if(ANKI_UNLIKELY(timeout))
+		if(timeout) [[unlikely]]
 		{
 			ANKI_VK_LOGF("Waiting for a fence timed out");
 		}

+ 1 - 1
AnKi/Gr/Vulkan/FrameGarbageCollector.cpp

@@ -16,7 +16,7 @@ FrameGarbageCollector::~FrameGarbageCollector()
 
 void FrameGarbageCollector::collectGarbage()
 {
-	if(ANKI_LIKELY(m_frames.isEmpty()))
+	if(m_frames.isEmpty()) [[likely]]
 	{
 		return;
 	}

+ 1 - 1
AnKi/Gr/Vulkan/GpuMemoryManager.cpp

@@ -34,7 +34,7 @@ Error GpuMemoryManagerInterface::allocateChunk(U32 classIdx, GpuMemoryManagerChu
 	}
 
 	VkDeviceMemory memHandle;
-	if(ANKI_UNLIKELY(vkAllocateMemory(m_parent->m_dev, &ci, nullptr, &memHandle) != VK_SUCCESS))
+	if(vkAllocateMemory(m_parent->m_dev, &ci, nullptr, &memHandle) != VK_SUCCESS) [[unlikely]]
 	{
 		ANKI_VK_LOGF("Out of GPU memory. Mem type index %u, size %zu", m_memTypeIdx,
 					 m_classInfos[classIdx].m_suballocationSize);

+ 2 - 2
AnKi/Gr/Vulkan/GrManager.cpp

@@ -112,7 +112,7 @@ GrManagerStats GrManager::getStats() const
 	type##Ptr GrManager::new##type(const type##InitInfo& init) \
 	{ \
 		type##Ptr ptr(type::newInstance(this, init)); \
-		if(ANKI_UNLIKELY(!ptr.isCreated())) \
+		if(!ptr.isCreated()) [[unlikely]] \
 		{ \
 			ANKI_VK_LOGF("Failed to create a " ANKI_STRINGIZE(type) " object"); \
 		} \
@@ -123,7 +123,7 @@ GrManagerStats GrManager::getStats() const
 	type##Ptr GrManager::new##type() \
 	{ \
 		type##Ptr ptr(type::newInstance(this)); \
-		if(ANKI_UNLIKELY(!ptr.isCreated())) \
+		if(!ptr.isCreated()) [[unlikely]] \
 		{ \
 			ANKI_VK_LOGF("Failed to create a " ANKI_STRINGIZE(type) " object"); \
 		} \

+ 1 - 1
AnKi/Gr/Vulkan/GrManagerImpl.cpp

@@ -1151,7 +1151,7 @@ Error GrManagerImpl::initMemory()
 void* GrManagerImpl::allocateCallback(void* userData, size_t size, size_t alignment,
 									  VkSystemAllocationScope allocationScope)
 {
-	if(ANKI_UNLIKELY(size == 0))
+	if(size == 0) [[unlikely]]
 	{
 		return nullptr;
 	}

+ 1 - 1
AnKi/Gr/Vulkan/MicroObjectRecycler.inl.h

@@ -165,7 +165,7 @@ void MicroObjectRecycler<T>::adjustAliveObjectCount()
 		readyObjects += obj.m_fenceDone;
 	}
 
-	if(ANKI_LIKELY(m_requests < m_maxRequestsPerAdjustment))
+	if(m_requests < m_maxRequestsPerAdjustment) [[likely]]
 	{
 		// Not enough requests for a recycle
 		m_minCacheSizePerRequest = min(m_minCacheSizePerRequest, readyObjects);

+ 1 - 1
AnKi/Gr/Vulkan/Pipeline.cpp

@@ -430,7 +430,7 @@ void PipelineFactory::getOrCreatePipeline(PipelineStateTracker& state, Pipeline&
 	U64 hash;
 	state.flush(hash, stateDirty);
 
-	if(ANKI_UNLIKELY(!stateDirty))
+	if(!stateDirty) [[unlikely]]
 	{
 		ppline.m_handle = VK_NULL_HANDLE;
 		return;

+ 2 - 2
AnKi/Physics/PhysicsWorld.cpp

@@ -60,8 +60,8 @@ public:
 		}
 
 		// Reject if they are both static
-		if(ANKI_UNLIKELY(fobj0->getMaterialGroup() == PhysicsMaterialBit::kStaticGeometry
-						 && fobj1->getMaterialGroup() == PhysicsMaterialBit::kStaticGeometry))
+		if(fobj0->getMaterialGroup() == PhysicsMaterialBit::kStaticGeometry
+		   && fobj1->getMaterialGroup() == PhysicsMaterialBit::kStaticGeometry) [[unlikely]]
 		{
 			return false;
 		}

+ 9 - 9
AnKi/Renderer/ClusterBinning.cpp

@@ -61,9 +61,9 @@ void ClusterBinning::populateRenderGraph(RenderingContext& ctx)
 		ctx.m_clusteredShading.m_clustersToken.m_offset, ctx.m_clusteredShading.m_clustersToken.m_range);
 
 	const RenderQueue& rqueue = *ctx.m_renderQueue;
-	if(ANKI_LIKELY(rqueue.m_pointLights.getSize() || rqueue.m_spotLights.getSize() || rqueue.m_decals.getSize()
-				   || rqueue.m_reflectionProbes.getSize() || rqueue.m_fogDensityVolumes.getSize()
-				   || rqueue.m_giProbes.getSize()))
+	if(rqueue.m_pointLights.getSize() || rqueue.m_spotLights.getSize() || rqueue.m_decals.getSize()
+	   || rqueue.m_reflectionProbes.getSize() || rqueue.m_fogDensityVolumes.getSize() || rqueue.m_giProbes.getSize())
+		[[likely]]
 	{
 		RenderGraphDescription& rgraph = ctx.m_renderGraphDescr;
 		ComputeRenderPassDescription& pass = rgraph.newComputeRenderPass("Cluster Binning");
@@ -105,41 +105,41 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 
 	// Check limits
 	RenderQueue& rqueue = *ctx.m_renderQueue;
-	if(ANKI_UNLIKELY(rqueue.m_pointLights.getSize() > kMaxVisiblePointLights))
+	if(rqueue.m_pointLights.getSize() > kMaxVisiblePointLights) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible point lights exceed the max value by %u",
 					rqueue.m_pointLights.getSize() - kMaxVisiblePointLights);
 		rqueue.m_pointLights.setArray(rqueue.m_pointLights.getBegin(), kMaxVisiblePointLights);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_spotLights.getSize() > kMaxVisibleSpotLights))
+	if(rqueue.m_spotLights.getSize() > kMaxVisibleSpotLights) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible spot lights exceed the max value by %u",
 					rqueue.m_spotLights.getSize() - kMaxVisibleSpotLights);
 		rqueue.m_spotLights.setArray(rqueue.m_spotLights.getBegin(), kMaxVisibleSpotLights);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_decals.getSize() > kMaxVisibleDecals))
+	if(rqueue.m_decals.getSize() > kMaxVisibleDecals) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible decals exceed the max value by %u", rqueue.m_decals.getSize() - kMaxVisibleDecals);
 		rqueue.m_decals.setArray(rqueue.m_decals.getBegin(), kMaxVisibleDecals);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_fogDensityVolumes.getSize() > kMaxVisibleFogDensityVolumes))
+	if(rqueue.m_fogDensityVolumes.getSize() > kMaxVisibleFogDensityVolumes) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible fog volumes exceed the max value by %u",
 					rqueue.m_fogDensityVolumes.getSize() - kMaxVisibleFogDensityVolumes);
 		rqueue.m_fogDensityVolumes.setArray(rqueue.m_fogDensityVolumes.getBegin(), kMaxVisibleFogDensityVolumes);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_reflectionProbes.getSize() > kMaxVisibleReflectionProbes))
+	if(rqueue.m_reflectionProbes.getSize() > kMaxVisibleReflectionProbes) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible reflection probes exceed the max value by %u",
 					rqueue.m_reflectionProbes.getSize() - kMaxVisibleReflectionProbes);
 		rqueue.m_reflectionProbes.setArray(rqueue.m_reflectionProbes.getBegin(), kMaxVisibleReflectionProbes);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_giProbes.getSize() > kMaxVisibleGlobalIlluminationProbes))
+	if(rqueue.m_giProbes.getSize() > kMaxVisibleGlobalIlluminationProbes) [[unlikely]]
 	{
 		ANKI_R_LOGW("Visible GI probes exceed the max value by %u",
 					rqueue.m_giProbes.getSize() - kMaxVisibleGlobalIlluminationProbes);

+ 3 - 3
AnKi/Renderer/Common.h

@@ -149,10 +149,10 @@ U32 findBestCacheEntry(U64 uuid, Timestamp crntTimestamp, const TCacheEntryArray
 
 	// First, try to see if the UUID is in the cache
 	auto it = map.find(uuid);
-	if(ANKI_LIKELY(it != map.getEnd()))
+	if(it != map.getEnd()) [[likely]]
 	{
 		const U32 cacheEntryIdx = *it;
-		if(ANKI_LIKELY(entries[cacheEntryIdx].m_uuid == uuid))
+		if(entries[cacheEntryIdx].m_uuid == uuid)
 		{
 			// Found it
 			return cacheEntryIdx;
@@ -170,7 +170,7 @@ U32 findBestCacheEntry(U64 uuid, Timestamp crntTimestamp, const TCacheEntryArray
 	Timestamp cacheEntryIdxToKickMinTimestamp = kMaxTimestamp;
 	for(U32 cacheEntryIdx = 0; cacheEntryIdx < entries.getSize(); ++cacheEntryIdx)
 	{
-		if(entries[cacheEntryIdx].m_uuid == 0)
+		if(entries[cacheEntryIdx].m_uuid == 0) [[likely]]
 		{
 			// Found an empty
 			emptyCacheEntryIdx = cacheEntryIdx;

+ 1 - 1
AnKi/Renderer/DepthDownscale.cpp

@@ -244,7 +244,7 @@ void DepthDownscale::runCompute(RenderPassWorkContext& rgraphCtx)
 	CommandBufferPtr& cmdb = rgraphCtx.m_commandBuffer;
 
 	// Zero the counter buffer before everything else
-	if(ANKI_UNLIKELY(!m_counterBufferZeroed))
+	if(!m_counterBufferZeroed) [[unlikely]]
 	{
 		m_counterBufferZeroed = true;
 

+ 1 - 1
AnKi/Renderer/GBuffer.cpp

@@ -201,7 +201,7 @@ void GBuffer::populateRenderGraph(RenderingContext& ctx)
 		rts[i] = m_runCtx.m_colorRts[i];
 	}
 
-	if(ANKI_LIKELY(m_runCtx.m_crntFrameDepthRt.isValid()))
+	if(m_runCtx.m_crntFrameDepthRt.isValid()) [[likely]]
 	{
 		// Already imported once
 		m_runCtx.m_crntFrameDepthRt =

+ 1 - 1
AnKi/Renderer/IndirectDiffuse.cpp

@@ -210,7 +210,7 @@ void IndirectDiffuse::populateRenderGraph(RenderingContext& ctx)
 		// Create RTs
 		const U32 readRtIdx = m_r->getFrameCount() & 1;
 		const U32 writeRtIdx = !readRtIdx;
-		if(ANKI_LIKELY(m_rtsImportedOnce))
+		if(m_rtsImportedOnce) [[likely]]
 		{
 			m_runCtx.m_mainRtHandles[0] = rgraph.importRenderTarget(m_rts[readRtIdx]);
 			m_runCtx.m_mainRtHandles[1] = rgraph.importRenderTarget(m_rts[writeRtIdx]);

+ 3 - 3
AnKi/Renderer/IndirectDiffuseProbes.cpp

@@ -388,7 +388,7 @@ void IndirectDiffuseProbes::prepareProbes(InternalContext& giCtx)
 	RenderingContext& ctx = *giCtx.m_ctx;
 	giCtx.m_probeToUpdateThisFrame = nullptr;
 
-	if(ANKI_UNLIKELY(ctx.m_renderQueue->m_giProbes.getSize() == 0))
+	if(ctx.m_renderQueue->m_giProbes.getSize() == 0) [[unlikely]]
 	{
 		return;
 	}
@@ -418,7 +418,7 @@ void IndirectDiffuseProbes::prepareProbes(InternalContext& giCtx)
 		// Find cache entry
 		const U32 cacheEntryIdx = findBestCacheEntry(probe.m_uuid, *getExternalSubsystems().m_globTimestamp,
 													 m_cacheEntries, m_probeUuidToCacheEntryIdx, getMemoryPool());
-		if(ANKI_UNLIKELY(cacheEntryIdx == kMaxU32))
+		if(cacheEntryIdx == kMaxU32) [[unlikely]]
 		{
 			// Failed
 			ANKI_R_LOGW("There is not enough space in the indirect lighting atlas for more probes. "
@@ -433,7 +433,7 @@ void IndirectDiffuseProbes::prepareProbes(InternalContext& giCtx)
 									 || entry.m_probeAabbMax != probe.m_aabbMax;
 		const Bool needsUpdate = cacheEntryDirty || entry.m_renderedCells < probe.m_totalCellCount;
 
-		if(ANKI_LIKELY(!needsUpdate))
+		if(!needsUpdate) [[likely]]
 		{
 			// It's updated, early exit
 

+ 1 - 1
AnKi/Renderer/IndirectSpecular.cpp

@@ -81,7 +81,7 @@ void IndirectSpecular::populateRenderGraph(RenderingContext& ctx)
 	// Create/import RTs
 	const U32 readRtIdx = m_r->getFrameCount() & 1;
 	const U32 writeRtIdx = !readRtIdx;
-	if(ANKI_LIKELY(m_rtsImportedOnce))
+	if(m_rtsImportedOnce) [[likely]]
 	{
 		m_runCtx.m_rts[0] = rgraph.importRenderTarget(m_rts[readRtIdx]);
 		m_runCtx.m_rts[1] = rgraph.importRenderTarget(m_rts[writeRtIdx]);

+ 1 - 1
AnKi/Renderer/MotionVectors.cpp

@@ -78,7 +78,7 @@ void MotionVectors::populateRenderGraph(RenderingContext& ctx)
 	const U32 writeHistoryLenTexIdx = m_r->getFrameCount() & 1;
 	const U32 readHistoryLenTexIdx = !writeHistoryLenTexIdx;
 
-	if(ANKI_LIKELY(m_historyLengthTexturesImportedOnce))
+	if(m_historyLengthTexturesImportedOnce) [[likely]]
 	{
 		m_runCtx.m_historyLengthWriteRtHandle =
 			rgraph.importRenderTarget(m_historyLengthTextures[writeHistoryLenTexIdx]);

+ 3 - 3
AnKi/Renderer/ProbeReflections.cpp

@@ -223,7 +223,7 @@ void ProbeReflections::prepareProbes(RenderingContext& ctx, ReflectionProbeQueue
 	probeToUpdateThisFrame = nullptr;
 	probeToUpdateThisFrameCacheEntryIdx = kMaxU32;
 
-	if(ANKI_UNLIKELY(ctx.m_renderQueue->m_reflectionProbes.getSize() == 0))
+	if(ctx.m_renderQueue->m_reflectionProbes.getSize() == 0) [[unlikely]]
 	{
 		return;
 	}
@@ -243,7 +243,7 @@ void ProbeReflections::prepareProbes(RenderingContext& ctx, ReflectionProbeQueue
 		// Find cache entry
 		const U32 cacheEntryIdx = findBestCacheEntry(probe.m_uuid, *getExternalSubsystems().m_globTimestamp,
 													 m_cacheEntries, m_probeUuidToCacheEntryIdx, getMemoryPool());
-		if(ANKI_UNLIKELY(cacheEntryIdx == kMaxU32))
+		if(cacheEntryIdx == kMaxU32) [[unlikely]]
 		{
 			// Failed
 			ANKI_R_LOGW("There is not enough space in the indirect lighting atlas for more probes. "
@@ -255,7 +255,7 @@ void ProbeReflections::prepareProbes(RenderingContext& ctx, ReflectionProbeQueue
 
 		// Check if we _should_ and _can_ update the probe
 		const Bool needsUpdate = !probeFoundInCache;
-		if(ANKI_UNLIKELY(needsUpdate))
+		if(needsUpdate) [[unlikely]]
 		{
 			const Bool canUpdateThisFrame = probeToUpdateThisFrame == nullptr && probe.m_renderQueues[0] != nullptr;
 			const Bool canUpdateNextFrame = !foundProbeToUpdateNextFrame;

+ 1 - 1
AnKi/Renderer/Renderer.cpp

@@ -627,7 +627,7 @@ void Renderer::registerDebugRenderTarget(RendererObject* obj, CString rtName)
 Bool Renderer::getCurrentDebugRenderTarget(Array<RenderTargetHandle, kMaxDebugRenderTargets>& handles,
 										   ShaderProgramPtr& optionalShaderProgram)
 {
-	if(ANKI_LIKELY(m_currentDebugRtName.isEmpty()))
+	if(m_currentDebugRtName.isEmpty()) [[likely]]
 	{
 		return false;
 	}

+ 1 - 1
AnKi/Renderer/RtShadows.cpp

@@ -201,7 +201,7 @@ void RtShadows::populateRenderGraph(RenderingContext& ctx)
 
 	// Import RTs
 	{
-		if(ANKI_UNLIKELY(!m_rtsImportedOnce))
+		if(!m_rtsImportedOnce) [[unlikely]]
 		{
 			m_runCtx.m_historyRt = rgraph.importRenderTarget(m_historyRt, TextureUsageBit::kSampledFragment);
 

+ 1 - 1
AnKi/Renderer/ShadowMapping.cpp

@@ -91,7 +91,7 @@ void ShadowMapping::populateRenderGraph(RenderingContext& ctx)
 	RenderGraphDescription& rgraph = ctx.m_renderGraphDescr;
 
 	// Import
-	if(ANKI_LIKELY(m_rtImportedOnce))
+	if(m_rtImportedOnce) [[likely]]
 	{
 		m_runCtx.m_rt = rgraph.importRenderTarget(m_atlasTex);
 	}

+ 1 - 1
AnKi/Renderer/TemporalAA.cpp

@@ -96,7 +96,7 @@ void TemporalAA::populateRenderGraph(RenderingContext& ctx)
 	const Bool preferCompute = getExternalSubsystems().m_config->getRPreferCompute();
 
 	// Import RTs
-	if(ANKI_LIKELY(m_rtTexturesImportedOnce[historyRtIdx]))
+	if(m_rtTexturesImportedOnce[historyRtIdx]) [[likely]]
 	{
 		m_runCtx.m_historyRt = rgraph.importRenderTarget(m_rtTextures[historyRtIdx]);
 	}

+ 1 - 1
AnKi/Resource/AnimationResource.cpp

@@ -208,7 +208,7 @@ void AnimationResource::interpolate(U32 channelIndex, Second time, Vec3& pos, Qu
 	rot = Quat::getIdentity();
 	scale = 1.0f;
 
-	if(ANKI_UNLIKELY(time < m_startTime))
+	if(time < m_startTime) [[unlikely]]
 	{
 		return;
 	}

+ 1 - 1
AnKi/Resource/MaterialResource.cpp

@@ -752,7 +752,7 @@ const MaterialVariant& MaterialResource::getOrCreateVariant(const RenderingKey&
 	// Check if it's initialized
 	{
 		RLockGuard<RWMutex> lock(prog.m_variantMatrixMtx);
-		if(ANKI_LIKELY(variant.m_prog.isCreated()))
+		if(variant.m_prog.isCreated()) [[likely]]
 		{
 			return variant;
 		}

+ 1 - 1
AnKi/Scene/VisibilityInternal.h

@@ -63,7 +63,7 @@ public:
 
 	T* newElement(StackMemoryPool& pool)
 	{
-		if(ANKI_UNLIKELY(m_elementCount + 1 > m_elementStorage))
+		if(m_elementCount + 1 > m_elementStorage) [[unlikely]]
 		{
 			m_elementStorage = max(kInitialStorage, m_elementStorage * kStorageGrowRate);
 

+ 6 - 6
AnKi/Script/Logger.cpp

@@ -16,14 +16,14 @@ static inline int pwraplogi(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 1)))
+	if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
 	{
 		return -1;
 	}
 
 	// Pop arguments
 	const char* arg0;
-	if(ANKI_UNLIKELY(LuaBinder::checkString(l, 1, arg0)))
+	if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -54,14 +54,14 @@ static inline int pwraploge(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 1)))
+	if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
 	{
 		return -1;
 	}
 
 	// Pop arguments
 	const char* arg0;
-	if(ANKI_UNLIKELY(LuaBinder::checkString(l, 1, arg0)))
+	if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -92,14 +92,14 @@ static inline int pwraplogw(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 1)))
+	if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
 	{
 		return -1;
 	}
 
 	// Pop arguments
 	const char* arg0;
-	if(ANKI_UNLIKELY(LuaBinder::checkString(l, 1, arg0)))
+	if(LuaBinder::checkString(l, 1, arg0)) [[unlikely]]
 	{
 		return -1;
 	}

File diff suppressed because it is too large
+ 117 - 117
AnKi/Script/Math.cpp


+ 6 - 6
AnKi/Script/Renderer.cpp

@@ -21,7 +21,7 @@ static MainRenderer* getMainRenderer(lua_State* l)
 	return r;
 }
 
-LuaUserDataTypeInfo luaUserDataTypeInfoMainRenderer = {-3798765529615162251, "MainRenderer",
+LuaUserDataTypeInfo luaUserDataTypeInfoMainRenderer = {-6365712250974230727, "MainRenderer",
 													   LuaUserData::computeSizeForGarbageCollected<MainRenderer>(),
 													   nullptr, nullptr};
 
@@ -38,7 +38,7 @@ static inline int pwrapMainRenderergetAspectRatio(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 1)))
+	if(LuaBinder::checkArgsCount(l, 1)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -80,7 +80,7 @@ static inline int pwrapMainRenderersetCurrentDebugRenderTarget(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 2)))
+	if(LuaBinder::checkArgsCount(l, 2)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -95,7 +95,7 @@ static inline int pwrapMainRenderersetCurrentDebugRenderTarget(lua_State* l)
 
 	// Pop arguments
 	const char* arg0;
-	if(ANKI_UNLIKELY(LuaBinder::checkString(l, 2, arg0)))
+	if(LuaBinder::checkString(l, 2, arg0)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -135,7 +135,7 @@ static inline int pwrapgetMainRenderer(lua_State* l)
 	[[maybe_unused]] void* voidp;
 	[[maybe_unused]] PtrSize size;
 
-	if(ANKI_UNLIKELY(LuaBinder::checkArgsCount(l, 0)))
+	if(LuaBinder::checkArgsCount(l, 0)) [[unlikely]]
 	{
 		return -1;
 	}
@@ -144,7 +144,7 @@ static inline int pwrapgetMainRenderer(lua_State* l)
 	MainRenderer* ret = getMainRenderer(l);
 
 	// Push return value
-	if(ANKI_UNLIKELY(ret == nullptr))
+	if(ret == nullptr) [[unlikely]]
 	{
 		lua_pushstring(l, "Glue code returned nullptr");
 		return -1;

+ 2 - 2
AnKi/Util/Allocator.h

@@ -88,7 +88,7 @@ public:
 	GenericPoolAllocator(AllocAlignedCallback allocCb, void* allocCbUserData, TArgs&&... args)
 	{
 		m_pool = static_cast<TPool*>(allocCb(allocCbUserData, nullptr, sizeof(TPool), alignof(TPool)));
-		if(ANKI_UNLIKELY(!m_pool))
+		if(!m_pool) [[unlikely]]
 		{
 			ANKI_UTIL_LOGF("Out of memory");
 		}
@@ -145,7 +145,7 @@ public:
 		PtrSize alignment = (hint != nullptr) ? *static_cast<const PtrSize*>(hint) : alignof(value_type);
 
 		void* out = m_pool->allocate(size, alignment);
-		if(ANKI_UNLIKELY(out == nullptr))
+		if(out == nullptr) [[unlikely]]
 		{
 			ANKI_UTIL_LOGF("Out of memory");
 		}

+ 1 - 1
AnKi/Util/File.cpp

@@ -383,7 +383,7 @@ Error File::writeText(CString text)
 	ANKI_ASSERT((m_flags & FileOpenFlag::kBinary) == FileOpenFlag::kNone);
 
 	const PtrSize writeSize = text.getLength();
-	if(ANKI_UNLIKELY(writeSize == 0))
+	if(writeSize == 0) [[unlikely]]
 	{
 		return Error::kNone;
 	}

+ 4 - 4
AnKi/Util/MemoryPool.cpp

@@ -70,7 +70,7 @@ void* mallocAligned(PtrSize size, PtrSize alignmentBytes)
 	PtrSize alignment = getAlignedRoundUp(alignmentBytes, sizeof(void*));
 	int err = posix_memalign(&out, alignment, size);
 
-	if(ANKI_LIKELY(!err))
+	if(!err) [[likely]]
 	{
 		ANKI_ASSERT(out != nullptr);
 		// Make sure it's aligned
@@ -214,7 +214,7 @@ void* HeapMemoryPool::allocate(PtrSize size, PtrSize alignment)
 
 void HeapMemoryPool::free(void* ptr)
 {
-	if(ANKI_UNLIKELY(ptr == nullptr))
+	if(ptr == nullptr) [[unlikely]]
 	{
 		return;
 	}
@@ -243,7 +243,7 @@ Error StackMemoryPool::StackAllocatorBuilderInterface::allocateChunk(PtrSize siz
 
 	void* mem = m_parent->m_allocCb(m_parent->m_allocCbUserData, nullptr, fullChunkSize, kMaxAlignment);
 
-	if(ANKI_LIKELY(mem))
+	if(mem) [[likely]]
 	{
 		out = static_cast<Chunk*>(mem);
 #if ANKI_MEM_EXTRA_CHECKS
@@ -316,7 +316,7 @@ void* StackMemoryPool::allocate(PtrSize size, PtrSize alignment)
 
 void StackMemoryPool::free(void* ptr)
 {
-	if(ANKI_UNLIKELY(ptr == nullptr))
+	if(ptr == nullptr) [[unlikely]]
 	{
 		return;
 	}

+ 1 - 1
AnKi/Util/Ptr.h

@@ -431,7 +431,7 @@ private:
 		if(m_ptr)
 		{
 			auto count = m_ptr->release();
-			if(ANKI_UNLIKELY(count == 1))
+			if(count == 1) [[unlikely]]
 			{
 				TDeleter deleter;
 				deleter(m_ptr);

+ 2 - 2
AnKi/Util/SegregatedListsAllocatorBuilder.inl.h

@@ -269,7 +269,7 @@ Error SegregatedListsAllocatorBuilder<TChunk, TInterface, TLock>::allocate(PtrSi
 
 	// Find starting class
 	const U32 startingClassIdx = findClass(size, alignment);
-	if(ANKI_UNLIKELY(startingClassIdx == kMaxU32))
+	if(startingClassIdx == kMaxU32) [[unlikely]]
 	{
 		ANKI_UTIL_LOGE("Couldn't find class for allocation of size %zu", origSize);
 		return Error::kOutOfMemory;
@@ -417,7 +417,7 @@ Error SegregatedListsAllocatorBuilder<TChunk, TInterface, TLock>::validate() con
 #define ANKI_SLAB_ASSERT(x, ...) \
 	do \
 	{ \
-		if(ANKI_UNLIKELY(!(x))) \
+		if(!(x)) [[unlikely]] \
 		{ \
 			ANKI_UTIL_LOGE(__VA_ARGS__); \
 			ANKI_DEBUG_BREAK(); \

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

@@ -307,7 +307,7 @@ void SparseArray<T, TConfig>::validate() const
 template<typename T, typename TConfig>
 typename TConfig::Index SparseArray<T, TConfig>::findInternal(Index idx) const
 {
-	if(ANKI_UNLIKELY(m_elementCount == 0))
+	if(m_elementCount == 0) [[unlikely]]
 	{
 		return getMaxNumericLimit<Index>();
 	}

+ 8 - 1
AnKi/Util/StdTypes.h

@@ -179,7 +179,14 @@ public:
 	/// Check if it is an error.
 	explicit operator Bool() const
 	{
-		return ANKI_UNLIKELY(m_code != kNone);
+		if(m_code != kNone) [[unlikely]]
+		{
+			return true;
+		}
+		else
+		{
+			return false;
+		}
 	}
 
 	/// @privatesection

+ 2 - 2
AnKi/Util/ThreadPosix.cpp

@@ -38,7 +38,7 @@ void Thread::start(void* userData, ThreadCallback callback, const ThreadCoreAffi
 		return numberToPtr<void*>(err._getCode());
 	};
 
-	if(ANKI_UNLIKELY(pthread_create(&m_handle, &attr, pthreadCallback, this)))
+	if(pthread_create(&m_handle, &attr, pthreadCallback, this)) [[unlikely]]
 	{
 		ANKI_UTIL_LOGF("pthread_create() failed");
 	}
@@ -54,7 +54,7 @@ void Thread::start(void* userData, ThreadCallback callback, const ThreadCoreAffi
 Error Thread::join()
 {
 	void* out;
-	if(ANKI_UNLIKELY(pthread_join(m_handle, &out)))
+	if(pthread_join(m_handle, &out)) [[unlikely]]
 	{
 		ANKI_UTIL_LOGF("pthread_join() failed");
 	}

+ 1 - 1
AnKi/Util/Tracer.cpp

@@ -45,7 +45,7 @@ Tracer::~Tracer()
 Tracer::ThreadLocal& Tracer::getThreadLocal()
 {
 	ThreadLocal* out = m_threadLocal;
-	if(ANKI_UNLIKELY(out == nullptr))
+	if(out == nullptr) [[unlikely]]
 	{
 		out = newInstance<ThreadLocal>(*m_pool);
 		out->m_tid = Thread::getCurrentThreadId();

Some files were not shown because too many files changed in this diff