Browse Source

Reworked Octree::Raycast() threading criteria once more: thread if will use 2 or more raycast work items.

Lasse Öörni 12 years ago
parent
commit
c0d1c19e25
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Engine/Graphics/Octree.cpp

+ 1 - 1
Source/Engine/Graphics/Octree.cpp

@@ -521,7 +521,7 @@ void Octree::Raycast(RayOctreeQuery& query) const
         GetDrawablesOnlyInternal(query, rayQueryDrawables_);
 
         // Check that amount of drawables is large enough to justify threading
-        if (rayQueryDrawables_.Size() >= queue->GetNumThreads() * RAYCASTS_PER_WORK_ITEM)
+        if (rayQueryDrawables_.Size() >= RAYCASTS_PER_WORK_ITEM * 2)
         {
             for (unsigned i = 0; i < rayQueryResults_.Size(); ++i)
                 rayQueryResults_[i].Clear();