Optimize scenes loading with Job System

This commit is contained in:
Wojtek Figat
2023-10-01 10:55:01 +02:00
parent f77198c7ca
commit b960600102
11 changed files with 162 additions and 69 deletions

View File

@@ -65,10 +65,10 @@ public:
template<typename AllocationType = HeapAllocation>
void GetValues(Array<T, AllocationType>& result) const
{
result.EnsureCapacity(MaxThreads);
for (int32 i = 0; i < MaxThreads; i++)
{
result.Add(_buckets[i].Value);
if (Platform::AtomicRead((int64 volatile*)&_buckets[i].ThreadID) != 0)
result.Add(_buckets[i].Value);
}
}