message: Turns out not culling events is much faster
diff: @@ -116,12 +116,7 @@ class StreamingTransientDataBufferST : protected core::impl::FriendOfHeterogenou
  inline void multi_free(uint32_t count, const size_type* addr, const size_type* bytes, IDriverFence* fence) noexcept
  {
  if (fence)
  - {
  - constexpr uint32_t maxEvents = 8192u; // TODO: After Skinned Mesh Instancing, tune this down to 128u
  - // large amount of events being kept alive is bad, mostly because IDriverFences are malloc'ed and lots of malloced objects hanging around slow the system down
  - deferredFrees.cullEvents(maxEvents);
  deferredFrees.addEvent(GPUEventWrapper(fence),DeferredFreeFunctor(&mAllocator,count,addr,bytes));
  - }
  else
  mAllocator.multi_free_addr(count,addr,bytes);
  }
  @@ -148,7 +143,7 @@ class StreamingTransientDataBufferST : protected core::impl::FriendOfHeterogenou
  DeferredFreeFunctor(core::HeterogenousMemoryAddressAllocatorAdaptor<BasicAddressAllocator,StreamingGPUBufferAllocator,CPUAllocator>* alloctr,
  size_type numAllocsToFree, const size_type* addrs, const size_type* bytes) : allocRef(alloctr), rangeData(nullptr), numAllocs(numAllocsToFree)
  {
  - rangeData = reinterpret_cast<size_type*>(getHostAllocator(*allocRef).allocate(sizeof(size_type)*numAllocs*2u,sizeof(size_type)));
  + rangeData = reinterpret_cast<size_type*>(getHostAllocator(*allocRef).allocate(sizeof(size_type)*numAllocs*2u,sizeof(size_type))); // TODO : RobustPoolAllocator
  memcpy(rangeData ,addrs,sizeof(size_type)*numAllocs);
  memcpy(rangeData+numAllocs ,bytes,sizeof(size_type)*numAllocs);
  }
  @@ -161,14 +156,14 @@ class StreamingTransientDataBufferST : protected core::impl::FriendOfHeterogenou
  ~DeferredFreeFunctor()
  {
  if (rangeData)
  - getHostAllocator(*allocRef).deallocate(reinterpret_cast<typename CPUAllocator::pointer>(rangeData),sizeof(size_type)*numAllocs*2u);
  + getHostAllocator(*allocRef).deallocate(reinterpret_cast<typename CPUAllocator::pointer>(rangeData),sizeof(size_type)*numAllocs*2u);// TODO : RobustPoolAllocator
  }
  DeferredFreeFunctor& operator=(const DeferredFreeFunctor& other) = delete;
  inline DeferredFreeFunctor& operator=(DeferredFreeFunctor&& other)
  {
  if (rangeData)
  - getHostAllocator(*allocRef).deallocate(reinterpret_cast<typename CPUAllocator::pointer>(rangeData),sizeof(size_type)*numAllocs*2u);
  + getHostAllocator(*allocRef).deallocate(reinterpret_cast<typename CPUAllocator::pointer>(rangeData),sizeof(size_type)*numAllocs*2u);// TODO : RobustPoolAllocator
  allocRef = other.allocRef;
  rangeData = other.rangeData;
  numAllocs = other.numAllocs;
  @@ -205,7 +200,7 @@ class StreamingTransientDataBufferST : protected core::impl::FriendOfHeterogenou
  private:
  core::HeterogenousMemoryAddressAllocatorAdaptor<BasicAddressAllocator,StreamingGPUBufferAllocator,CPUAllocator>* allocRef;
  - size_type* rangeData;
  + size_type* rangeData; // TODO : RobustPoolAllocator
  size_type numAllocs;
  };
  GPUEventDeferredHandlerST<DeferredFreeFunctor> deferredFrees;
  